On Wed, Jul 26, 2000 at 08:25:32PM -0500, Vidiot wrote:
| >the error message is being printed to the stderr stream.  Use this
| >syntax instead:
| >
| >perl -w frank >& test.file
| >
| >BTW: This syntax is bash specific.  If you're using a csh derivative,
| >it works slightly differently.
| >Steve Borho                       Voice:  314-615-6365
| 
| The >& is csh syntax as well.  Works for zsh too.

Yeah, that syntax started in csh. But bear in mind that >& is

        - clumsy - sends BOTH stdout and stderr to the file
        - nonportable - your scripts will fail horribly on other unix platforms

Just use

        >file           for stdout
        2>file          for stderr
        >file 2>&1      for both (the order matters, btw, and there are sane
                        uses for the other order, which has a different effect)

and don't waste your time with nonportable rubbish like >&, which
serves no purpose. Zsh sort of has an excuse in that it sports a
gazillion options including a variety of act-like-csh things, but bash?
Feeping creaturism.

Remember people:
        - linux != GNU
        - GNU != UNIX

Try to write portable things and you'll be happier in the long run when you
try them on someone else's machine.
-- 
Cameron Simpson, DoD#743        [EMAIL PROTECTED]    http://www.zip.com.au/~cs/

Besides, it's good to force C programmers to use the toolbox occasionally. :-)
        - Larry Wall in <[EMAIL PROTECTED]>


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to