On Wednesday 23 March 2005 03:40 pm, Stuart Jansen wrote:
> On Wed, 2005-03-23 at 15:30 -0700, Nicholas Leippe wrote:
> > On Wednesday 23 March 2005 03:04 pm, Stuart Jansen wrote:
> > > Safer would be
> > > to stop doing a one liner.
> >
> > What's wrong with one-liners?  Why not:
> >
> > f=.$RANDOM; mkfifo $f; find -iname '*.csv' > $f & \
> > tar -T $f -cjf archive.tar.bz2 && rm $f
>
> Heh, nice. ;-)
>
> Might want to toss an || rm $f to emulate a finally block.
>
> /me wonders if that works with files containing spaces in the name

if not, you can always add more:

f=.$RANDOM; mkfifo $f; find -iname '*.csv' | \
sed 's/\(^.*$\)/"\1"/' > $f & \
tar -T $f -cjf archive.tar.bz2 && rm $f

;)

-- 
Respectfully,

Nicholas Leippe
Sales Team Automation, LLC
1335 West 1650 North, Suite C
Springville, UT  84663 +1 801.853.4090
http://www.salesteamautomation.com
.===================================.
| This has been a P.L.U.G. mailing. |
|      Don't Fear the Penguin.      |
|  IRC: #utah at irc.freenode.net   |
`==================================='

Reply via email to