On 1 Dec 1999, Mark Gray wrote: mg> Nick Zentena <zentena@hophead.dyndns.org> writes: mg> mg> > to work from the command line but I'm banging my head against the wall mg> > getting it to work from within a script. So anybody willing to point out mg> > the right way to do this? mg> mg> Or ... if you prefer to not use perl: mg> mg> export IPADDR=$(ifconfig ${EXT_INT}|sed -ne '/addr:/{s/.*addr:\([^ ]*\).*/\1/;p;}') mg> mg> mg> Hope this (or the perl version) helps. mg> (TIAAWTDI) mg> mg> (Leaving out the export is probably what was causing you problems, but mg> cutting 3 processes down to 1 is always a big savings. mg> The only real purpose of export is to make it available to the rest of the system, in the case of initializing a firewall, or making the ip available for a script that is run from within the same file as the ipaddr query, an export isn't really necessary. Whether making that a global variable will interfere somehow down the road I don't know, but if it doesn't have to be global, why take the chance? Does that make sense? mg> mg> -- S.Toms - tomas@primenet.com - New homepage coming soon SuSE Linux v6.2+ - Kernel 2.2.13 "The voters have spoken, the bastards ..." -- 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/