[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Cool shell tricks (was: Re: file system questions)
On Tue, Oct 17, 2000 at 04:59:48PM +0200, guy keren wrote:
> there is a dirty method you could use. every once in a while (perhaps even
> via a cron job), execute the command:
>
> :>/path/to/.xsession-error
Cool.
I love these little shell tricks... I'm personally particularly fond
of the old "(cd dir1; tar c) | (cd dir2; tar xv)" thing, but it's been
discussed here extensively before.
Also, seems that not many people are aware of "process substitution"
in bash: you do something like "diff <(ls dir1) <(ls dir2)", and bash
runs two ls's, each writing to a FIFO, and diff gets the names of
these two FIFOs as parameters. Output redirection also works. I'm not
sure how portable it is, though.
Does anyone else like these tricks? I'd love to hear about other
people's.
- Adi Stav
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il