Hi,
I'm completely new to awk, anyway I have a request.
Currently I have a file with thousands of records. I want to print only the last 20 lines of the file and redirect it to another file.
So far,
for i in `tail -20 <file_name`
do
echo $i >> ztmp
done
I was wondering if this could be done in awk. My objective is to print only the footer which is 20 lines from the end of file and put in another file.
Any help would be great . . .
Thanks
Warcypher
I'm completely new to awk, anyway I have a request.
Currently I have a file with thousands of records. I want to print only the last 20 lines of the file and redirect it to another file.
So far,
for i in `tail -20 <file_name`
do
echo $i >> ztmp
done
I was wondering if this could be done in awk. My objective is to print only the footer which is 20 lines from the end of file and put in another file.
Any help would be great . . .
Thanks
Warcypher