/dev/null is to keep grep quiet... otherwise it would outputthe line
thatmatched. If you want to see it when a match is found, then
you could take that out. The break is there so when it finds
a match it breaks out of the loop, since there's no reason to
keep looping once a match is found.
If you want to pipe the output of scs2ascii through this
script, you would have to do it like so:
users="PHILLIP SAM RICHARD"
for user in $users; do
echo "$file" | grep $user >/dev/null && echo "$file" >
+%Y-%m-%d-%H:%m` && break
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.