← Back to team overview

sslug-teknik team mailing list archive

Re: Command substitution: hvor er std.error?

 

"Kent B. Hansen" wrote:
> output=`ls`
> 
> putter standard output over i variablen, men hvordan får jeg fat i
> standard error?? (Jeg vil helst undgå at redirigere til en fil).

Fx. redirecter flg. stderr til stdout:

YT=`ls afhksf 2>&1`
echo $YT
ls: afhksf: No such file or directory

Se ozze man bash. Søg efter ^REDIRECTION . Der er flere måder...
-- 
Regards,
              Mogens Valentin
    Networking - Security - Programming
  Linux configuration and troubleshooting
http://www.danbbs.dk/~monz - monz@xxxxxxxxx


References