I have created a very nice data collection script that
does numerous things. One certain aspect of the script
is that it finds the location of specific files on a *nix
box. For example, I do the simple *nix find command
for all aliases files on the machine then push the
output to a file called system_aliases. The output looks
like this
194610 4 -rw-r--r-- 1 root root 1048 Mar 3 2001 /etc/aliases
Naturally, the output would be deliminated by the width
of the browser your using.
The next step which I am unsure of how to do is this.
I want to take the contents of the files that were created. Read in the location of each file
So,
open (IN, $file_with_information);
open (OUT, ">./file_output_to"
while (<IN>)
{ $buffer .= $_; } # read the entire file into $buffer
Heres where i lose it. How do i choose just the /etc/aliases file specifically when I have an output as
depicted earlier??
Then once I've been able to read in just that file how
do I manipulate it in a manner that basically lets me
cat the output to an outfile. Oh, and by the way I have
numerous files that I will run this same routine on so how
do I make just one out file with all the data in one place?
Just so everyone knows. I have looked around in alot
of books but nothing jumps out. I hope that this group
could add some light and help.
TIA
Infor
does numerous things. One certain aspect of the script
is that it finds the location of specific files on a *nix
box. For example, I do the simple *nix find command
for all aliases files on the machine then push the
output to a file called system_aliases. The output looks
like this
194610 4 -rw-r--r-- 1 root root 1048 Mar 3 2001 /etc/aliases
Naturally, the output would be deliminated by the width
of the browser your using.
The next step which I am unsure of how to do is this.
I want to take the contents of the files that were created. Read in the location of each file
So,
open (IN, $file_with_information);
open (OUT, ">./file_output_to"
while (<IN>)
{ $buffer .= $_; } # read the entire file into $buffer
Heres where i lose it. How do i choose just the /etc/aliases file specifically when I have an output as
depicted earlier??
Then once I've been able to read in just that file how
do I manipulate it in a manner that basically lets me
cat the output to an outfile. Oh, and by the way I have
numerous files that I will run this same routine on so how
do I make just one out file with all the data in one place?
Just so everyone knows. I have looked around in alot
of books but nothing jumps out. I hope that this group
could add some light and help.
TIA
Infor