[Gllug] This morning's shell script question

Chris Jones cmsj at tenshu.net
Fri May 25 00:10:15 UTC 2007


Hi

Richard Jones wrote:
>>From a shell script I want to run a command and sends the command's
> stderr to a pipe (to the logger command, in fact).  But leave
> stdin/stdout connected to the terminal as normal.

command 3>&2 2>&1 1>&3- | othercommand

(this kinda depends on /dev/fd/3 existing, but it should)

Cheers,
-- 
Chris Jones
  cmsj at tenshu.net
   www.tenshu.net
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list