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

Re: script problem



On Fri, 14 Jul 2006 11:41:52 +0200, Evgeni Golov wrote
> On Fri, 14 Jul 2006 11:35:13 +0200 "Jan Kohnert"

> > RG=$(ping -c 1 $BA_HOST > /dev/null)
> > echo $RG
> > 
> > fuer Output in $RG oder
> 
> für Fehler in $RG!
> 
> > RG=$(ping -c 1 $BA_HOST 2> /dev/null)
> > echo $RG
> > 
> > fuer Fehler in $RG benutzen.
> 
> für Output in $RG!
> 
> Da hast du wohl die beiden Sachen verdreht ;-)

Ich empfehle an dieser Stelle man bash:
REDIRECTION
       Before a command is executed, its input and output may  be
       redirected  using  a  special  notation interpreted by the
       shell.  Redirection may also be used  to  open  and  close
       files  for  the  current shell execution environment.  The
       following redirection operators may precede or appear any­
       where  within  a  simple  command or may follow a command.
       Redirections are processed in the order they appear,  from
       left to right.

       In the following descriptions, if the file descriptor num­
       ber is omitted, and the first character of the redirection
       operator  is  <,  the  redirection  refers to the standard
       input (file descriptor 0).  If the first character of  the
       redirection  operator  is >, the redirection refers to the
       standard output (file descriptor 1).

und folgendes. ;)

-- 
MfG Jan

Open WebMail Project (http://openwebmail.org)



Reply to: