At 10:15 AM 1/18/2001, you wrote:
>Since I (and probably others) learn best from examples, I thought it
>would be cool if we all could share command line tricks that we've
>picked up and use often. Tricks with perl, awk, sed, xargs and all
>the other unix tools with redirects and pipes - the works.
Have a dynamic ip and want to extract only the ip address from say
ifconfig?
/sbin/ifconfig | grep xxx | cut -c 21- | cut -c -14
where xxx = the first quad of your isp. Ex. my isp is rio.com 208.137.0.0, so
xxx = 208
I have a series of scripts to extract the dynamic ip every time pppd fires and
insert the new address into some files and ftp the new files to my static web
pages. This allows me to make services on my local box accessible without
static routing.
jk
-----------------------------
James S. Kaplan KG7FU
Eugene Oregon USA
[EMAIL PROTECTED]
http://www.rio.com/~kg7fu
ICQ # 1227639
Have YOU tried Linux today?
-----------------------------