While running a bash shell script which contains this command:
iperf -c $server_ip -p $iperf_port -t $iperf_duration >> outputfile
the output is many times displayed on console rather than getting appended in the outputfile. Any solutions for same? Am I doing anything wrong?
I am using Ubuntu 12.04
I’m not familiar with
iperf, but presumably it’s writing some or all of its output to standard-error rather than to standard-output. To merge standard-error with standard-output and send them both to your file, you can add2>&1to the end: