suppress output of hping in Linux
As @mark-wagner said, the correct syntax is
hping3 10.1.1.1 -c 1 -q >/dev/null 2>&1
This redirects standard output to a bit-bucket file called /dev/null
, and then redirects standard error to the same place.
If this was insufficient (for example, output not on standard error or standard out) then you could do this:
( hping3 10.1.1.1 -c 1 -q ) >/dev/null
This should work, no matter where the output is directed - I think.