[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33972: grep -vf <(<nothing>) filters all rows

From: luke
Subject: bug#33972: grep -vf <(<nothing>) filters all rows
Date: Fri, 4 Jan 2019 00:04:28 -0500
User-agent: SquirrelMail/1.4.22

I have to pre-check for an empty set before passing it to grep:
SAVED_RECORDs=($(sqlite3 -list -separator '/' files.db "SELECT FileName FROM 
Files WHERE ModTime > '2018-12-31'")) #Returns an empty set
NEW_RECs=($(ls * | grep -vf <(echo address@hidden
| tr ' ' '\n') #Returns an empty list because grep considers SAVED_RECORDs to 
be universal rather than null set

if [ address@hidden -gt 0 ]; then

� NEW_RECs=($(ls * | grep -vf <(echo address@hidden | tr ' ' '\n') #Now returns 
the expected subtraction of SAVED_RECORDs from NEW_RECs


reply via email to

[Prev in Thread] Current Thread [Next in Thread]