How to read last line from multiple files and redirect it into a single file using Linus script.
Ashwin Kumar Balasubramanian
Joined: Aug 03, 2012
I got a folder named Server_logs. Inside that there are 20 files named in following way.
data_log_192.168.27.2.log........ so on till
These files differ only from their IP address. I want to open up each file and read only the last line from these files. the last line has the following information " 129G 39G 84G 32% /data ". and redirect these data's from other files into a single file.
Can anyone write a script and give me please. Am totally new to Linux and am not getting the proper code to write.