Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AWK ... Delete first 56 lines of a file 2

Status
Not open for further replies.

globemast

Programmer
Jun 24, 2006
7
CY
Hello,

I would like to delete the first 56 lines of a file that i have using AWK.

Could you give me some help on this..

Thanks in advance.
 
[tt]
Perhaps using an array:

$ cat script
{a[NR]=$0}

END {
for(i=57;i<=NR;i++)
print a
}

$ awk -f script datafile




[/tt]

 
Thanks geirendre,

That worked fine.

Thanks also to everyone else that replied to this question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top