ext_106590: (waffle off)
frobzwiththingz.livejournal.com ([identity profile] frobzwiththingz.livejournal.com) wrote in [personal profile] chhotii 2013-12-11 01:21 am (UTC)

Ok, Chip's got a good answer... Here's a truly horrible one:

for I in *; do test -f "$I" && awk ' BEGIN { last = 0 ; status = 1 } { if (/jpg/) { if (last == 1) { print $0, "line number ", NR ; status = 0 } else last = 1 } else last=0 } END { if (status == 1) exit 1 }' < "$I" && echo " file $I matches"; done

Don't use this. There's *got* to be a horrible bug in there somewhere. Unless you hate your workplace. In that case, make sure it gets into some important automated build process.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting