Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] The Mother of All (bash) Commands



On Tue, Mar 18, 2008 at 11:10:28PM -0800, SL Baur wrote:
> On 3/18/08, Nguyen Vu Hung <vuhung16plus+shape@example.com> wrote:
> >  Btw, in coreutils, true --help and true --version do show somethings.
> 
> Yes, that was my point and it is ludicrous, but whatever.
> 
> >  Btw, what is the proper way to zero a file?
> >
> >  true > file or
> >  echo "" > file or
> >  cat /dev/null > file
> 
> A simple `> file' will suffice.

Except in zsh(6), where it runs $NULLCMD and sends the ouput of that to
the file.  And NULLCMD defaults to the hair-tearing cat(1), rather than
to (as one might expect), : .

--Dave


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links