Re: Simple Scripting ? (Is directory empty?)


Subject: Re: Simple Scripting ? (Is directory empty?)
From: Tom Pollard (pollard@schrodinger.com)
Date: Sat Dec 18 1999 - 09:33:11 MST


On Fri, 17 Dec 1999, Adam Price wrote:
> So ..... how do I suppress the status messages that maildirserial
> gives. I now have it sending in the background while I run pine, but
> when I quit pine, I get long success reports from maildirserial. The
> obvious way to suppress would be a flag in the call, but there is no such
> flag mentioned in the maildirserial man pages. There must be a way to
> send all output of the script to /dev/null or something?

I don't have your original post anymore, so I don't know what
maildirserial is. But, if you want to direct all output from a command to
/dev/null, use

    command > /dev/null 2>&1

In a script, it's more common to want to send just the error output from
a command to /dev/null (and use '$?' to detect command failure). To send
just the error output to /dev/null, you say

    command 2> /dev/null

If the command has ordinary output that you're capturing to a file, but
you want to discard the error output, I think you have to use

    (command > outputfile) 2> /dev/null

Hope one of those is what you were looking for.

Cheers,

Tom

-------------------------------------------------------------------------
W. Thomas Pollard Schrodinger, Inc.
pollard@schrodinger.com http://www.schrodinger.com/
-------------------------------------------------------------------------



This archive was generated by hypermail 2a24 : Sun Jan 02 2000 - 12:12:58 MST