more useful options | |
PerlMonks |
Hide program output from terminalby Milamber (Beadle) |
on Sep 15, 2006 at 07:29 UTC ( [id://573060]=perlquestion: print w/replies, xml ) | Need Help?? |
Milamber has asked for the wisdom of the Perl Monks concerning the following question:
Hello monks, I'm playing with a script on Ubuntu that switches my interface configuration between an interface.dynamic file which allows my network card to use DHCP, and an interface.static file which contains a list of virtual interfaces that I use for various networks and devices I connect to frequently. Running works like a charm. However, I want to hide the output from /etc/init.d/networking/start from the terminal, and just display my success or failure message. I've tried directing STDOUT to /dev/null, to no avail (and probably not surprisingly). My Cookbook has a recipe for using IPC::Open3, which I think might do what I want once I suss out what I'm doing, but I was wondering if there's another way of doing this that I am missing in my ignorance. The point of this script is, by the by, simply because I can and because it is more fun than the simple shell script I have to accomplish this task already. My thanks in anticipation of your forthcoming wisdom ;) Update: Considering English is my only language, I really shouldn't have to edit out the mistakes I've made after being given a preview.
Back to
Seekers of Perl Wisdom
|
|