On Wed, Dec 01, 1999 at 11:29:21AM -0500, Nick Zentena wrote: ...
Which won't work for some reason. I've managed to get:
ifconfig ppp0 | grep 'addr' | awk '{printf $2}' | sed -e s/addr://
to work from the command line but I'm banging my head against the wall getting it to work from within a script. So anybody willing to point out the right way to do this?
You may need to hard-code the path to ifconfig in the script. Depending on how you want to run the script, a "shebang" line might be useful, e.g., #!/bin/sh as the first line, then use, e.g., 'chmod g+x myscript' to make it executable. The fact that you can run ifconfig seems suspicious to me, since a normal (non-root) user probably shouldn't be running things in /sbin or /usr/sbin. Maybe you've got a symbolic link to ifconfig (which is ok). If you're running as root (not recommended!) another issue may be that root normally doesn't include the current directory in the path; in that case you'd have to use './myscript' to explicitly specify the path. -- Ken Irving Trident Software jkirving@mosquitonet.com -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/