Unless you need to create the file for any other reason, you should be able to use backticks to capture the output of the command to a variable, the simply ( yeah right :-) ), use a reg exp to strip it out
eg $ConfigString = `ifconfig ppp0` The variable $ConfigString will now contain the output from the ifconfig command. You should now be able to separate the part you need with pattern matching. HTH Rod the IFFO > -----Original Message----- > From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]] > Sent: 04 October 2001 08:20 > To: [EMAIL PROTECTED] > Subject: Copy file output to a text file > > > > List, > > > > I have this problem that has been bothering me all day. > All I want is > > to be able to copy the out put of ifconfig to a text file > > /etc/ppp/ppp.txt > > > > I have tried so many things but I can't get it to work. Once I have > > done this I need to be able to extract the ADSL ip address from ppp0 > > and then store that in a variable. > > > > Is this possible or am I wasting my time? > > > > Dan > > > > ============================== > > VINTEK CONSULTING PTY LTD > > (ACN 088 825 209) > > Email: [EMAIL PROTECTED] > > WWW: http://www.vintek.net > > Tel: (08) 8523 5035 > > Fax: (08) 8523 2104 > > Snail: P.O. Box 312 > > Gawler SA 5118 > > ============================== > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]