Skip to main content
bash is not central to the question
Source Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 264

Linux + bash + redirect output of command to /dev/null

I run the following line from my bash script in order to run the script /usr/run.pl on remote machinemachines

  xargs -P "$numprocs" -I '{}' -n  1 -- perl -e 'alarm shift; exec @ARGV' -- "$timeout" ssh -nxaq -o ConnectTimeout=5 -o StrictHostKeyChecking=no '{}' /usr/run.sh < <(echo -e "$node") 

but I get on the console the following standard output

Connection to 143.6.22.4 closed by remote host.
 xargs: perl: exited with status 255; aborting

where I need to put the 1>/dev/null in my syntax to avoid this message?

Linux + bash + redirect output of command to /dev/null

I run the following line from my bash script in order to run the script /usr/run.pl on remote machine

  xargs -P "$numprocs" -I '{}' -n  1 -- perl -e 'alarm shift; exec @ARGV' -- "$timeout" ssh -nxaq -o ConnectTimeout=5 -o StrictHostKeyChecking=no '{}' /usr/run.sh < <(echo -e "$node") 

but I get on the console the following standard output

Connection to 143.6.22.4 closed by remote host.
 xargs: perl: exited with status 255; aborting

where I need to put the 1>/dev/null in my syntax to avoid this message?

redirect output of command to /dev/null

I run the following line from my bash script in order to run the script /usr/run.pl on remote machines

  xargs -P "$numprocs" -I '{}' -n  1 -- perl -e 'alarm shift; exec @ARGV' -- "$timeout" ssh -nxaq -o ConnectTimeout=5 -o StrictHostKeyChecking=no '{}' /usr/run.sh < <(echo -e "$node") 

but I get on the console the following standard output

Connection to 143.6.22.4 closed by remote host.
 xargs: perl: exited with status 255; aborting

where I need to put the 1>/dev/null in my syntax to avoid this message?

Source Link
yael
  • 1.6k
  • 11
  • 35
  • 61

Linux + bash + redirect output of command to /dev/null

I run the following line from my bash script in order to run the script /usr/run.pl on remote machine

  xargs -P "$numprocs" -I '{}' -n  1 -- perl -e 'alarm shift; exec @ARGV' -- "$timeout" ssh -nxaq -o ConnectTimeout=5 -o StrictHostKeyChecking=no '{}' /usr/run.sh < <(echo -e "$node") 

but I get on the console the following standard output

Connection to 143.6.22.4 closed by remote host.
 xargs: perl: exited with status 255; aborting

where I need to put the 1>/dev/null in my syntax to avoid this message?