Joel Bernstein wrote:
/sbin/ifconfig|grep eth0 -2|grep inet|cut -f2 -d:|awk '{print $1}' would
work, non? for eth0 anyway. that extends fairly trivially to something
for each eth stanza...
Obligatory cut-down-use-of-multiple-processes:
ifconfig -a | awk '/inet addr:/{split($2,a,/:/);print
Mongers,
I've been trying to assemble a simple bash script that will set up some
simple VPN tunnels for me when I need to connect to my company's
Netscreen box.
I've made it most of the way there, but I currently need one script for
each possible address (e.g. sh /init.d/vpn/192.168.0.1.sh,
On Tue, Mar 18, 2003 at 05:12:35PM +, Jon Reades wrote:
Mongers,
Mongchop to you ;-)
I've been trying to assemble a simple bash script that will set up some
simple VPN tunnels for me when I need to connect to my company's
Netscreen box.
I've made it most of the way there, but I
On Tue, 2003-03-18 at 17:12, Jon Reades wrote:
A much easier way to do this would be to have the bash script get the
local IP address by requesting it directly from the client machine.
Unfortunately, ifconfig is a little hard to parse if you're not human
and using bash, and I can't find any
* Jon Reades jreades at fulcrumanalytics.com [2003-03-18 12:15]:
Does anyone have suggestions for where/how I could obtain this
information?
It's not bash, but it will work:
perl -MSys::Hostname -MSocket -e 'print inet_ntoa inet_aton hostname'
(darren)
--
Whatever is done for love is
Joel Bernstein wrote:
snip
/sbin/ifconfig|grep eth0 -2|grep inet|cut -f2 -d:|awk '{print $1}' would
work, non? for eth0 anyway. that extends fairly trivially to something
for each eth stanza...
Ah, piece of cake, why didn't I figure that out for myself. ;) I knew
there was a reason I broke out