in reply to Ifconfig error capture
The message you're looking for comes out on STDERR, but the backticks only capture what comes out on STDOUT. What you can do is have the shell redirect the error stream to the normal output stream like so:
$code = `ifconfig eth0 hw ether $mac 2>&1`;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Ifconfig error capture
by WalkingZero (Sexton) on Mar 12, 2008 at 22:01 UTC |