10-04-2004 07:51 PM
I have one file on different servers like:
I need a file with:
server1:logfile1 (here each line of logfile1)
server2:logfile1 (here each line of logfile1)
server3:logfile1 (here ....)
With cat logfile1 >> output I do not have the server-names.
Thanks for help
Solved! Go to Solution.
10-04-2004 08:22 PM
while read line; do
done < input > ouput
Else with perl script as,
perl -pe 's/^/'$(hostname)'/g' inputfile > outputfile