Re: scripted mv question
"Lobb, Janos" <[email protected]> Fri, 27 Apr 2012 13:50:49 +0000
| Newsgroups | gmane.comp.macosx.admin |
|---|---|
| Message-ID | <[email protected]> |
On Apr 26, 2012, at 10:42 PM, LuKreme wrote: > > > On Apr 26, 2012, at 15:04, "Lobb, Janos" <[email protected]> wrote: > >> bml0041:~ janos$ find "$SRCDIR" -type f |grep 2 |sort -r |tail -1 >> /Volumes/Data/PROJECTS/Sysmon/sysmsa/2009_08_10_13.log >> >> I would like to move the found file into the $BKPDIR >> >> Any good hint how to do it ? > > mv `find "$SRCDIR" -type f |grep 2 |sort -r |tail -1 > /Volumes/Data/PROJECTS/Sysmon/sysmsa/2009_08_10_13.log` $BKPDIR > > Should work. > Yep, it works: bml0041:~ janos$ mv `find "$SRCDIR" -type f |grep 2 |sort -r |tail -1` $BKPDIR Thanks a lot, János