in reply to Hide program output from terminal
print "Stopping network...\n"; system('/etc/init.d/network stop 1>/dev/null 2>&1'); print "Starting network...\n"; system('/etc/init.d/network start 1>/dev/null 2>&1');
2>&1 redirects STDOUT to the same place that STDERR is going, ie. to /dev/null.
Update: However, you probably should think about doing something useful with STDOUT and STDERR, such as redirecting the output to a logfile. That way, you have somewhere to check if something goes wrong.
Hope this helps,
Darren :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hide program output from terminal
by Milamber (Beadle) on Sep 15, 2006 at 09:24 UTC |