Wups! Sorry -- I read your question wrong: "Does *find* run concurrently*. I'd had other concerns, and mis-read your question to fit my thinking. D'oh! It's been my experience that find doesn't get confused, it just gets miffed, and moves on.
-Ken On Thu, October 29, 2009 5:03 pm, Ken D'Ambrosio wrote: > Interesting point. Three replies: > 1) If you're mv'ing onto the same filesystem, the inodes will never > change, and it won't matter. 2) I imagine grep will only spit out a status > (which is what the "&&" > parses) after it's finished running, though I'd have to verify that > empirically. 3) You can cheat, and do something like this: > > > cat "$i/*" | grep -l moe && mv "$i" /destpath || echo "mv didn't work: > $?" > > > -Ken > > > On Thu, October 29, 2009 4:41 pm, Ben Scott wrote: > >> On Thu, Oct 29, 2009 at 2:31 PM, Ken D'Ambrosio <k...@jots.org> wrote: >> >> >>> find -type d | while read i do grep moe "$i/*" && mv "$i" >>> /path/to/destination || echo "mv didn't work: $?" >>> done >> >> Hmmm, does the "find" execute concurrently with the "grep"? If it >> does, then you're liable to confuse the hell out of "find" if you manage >> to move a directory which is a component of the path it's currently >> trasversing. >> >> -- Ben >> _______________________________________________ >> gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org >> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/ >> >> >> >> -- >> This message has been scanned for viruses and >> dangerous content by MailScanner, and is believed to be clean. >> >> > > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is believed to be clean. > > _______________________________________________ > gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org > http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/ > > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. _______________________________________________ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/