If you really want to get the whole file and print it, then you would need to shutoff
the input record separator and print it out:
undef $/;
$file = <IFCONFIG>;
printf $file
or
change $ to @ and it would read the whole file in:
@file = <IFCONFIG>;
print @file;
Wags ;)
-----Original Message-----
From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 03, 2001 19:18
To: [EMAIL PROTECTED]
Subject: Piping ifconfig to a text file
List,
Can some one help me with opening ifconfig and pipe it to a text file.
Then I want to be able to view that file.
How would I go about this?
open IFCONFIG, "/sbin/ifconfig";
$file=<IFCONFIG>;
print $file;
....
Kind regards,
Daniel Falkenberg
==============================
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]