1

I am using fping to ping several devices from a text file and export the info into another file.

fping -lDf IPlist >IPoutput

This works, "Host unreachable messages" however do not get exported into the file, only successful pings.

However I would want to catch those too, how can I make fping to do that?

(CentOS 7)

ping

1 Answers1

1

Error messages are usually outputted into standard error output, or stderr. It is intentionally separate from regular standard output.

To redirect both regular output and errors to a file, do:

fping -lDf IPlist >IPoutput 2>&1
telcoM
  • 4,598