Quantcast
Channel: UNIX and Linux Forums - AIX
Viewing all articles
Browse latest Browse all 373

Script to cat and dd last line!!! of each file

$
0
0
hi Guys,
Am new to this awesome forum, and yea i need some help here asap thnx :)

i have a directory with over 34000 text files, i need a script that will delete the last line of each of this file without me necessary opening the files.

illustration:-
file1 200 records
file2 130 records
file3 500 records
......etc

so i will need a script to go into each file and delete just the last line(last record) of each of this text files.

thnx for your help!!!

Viewing all articles
Browse latest Browse all 373

Trending Articles