Feb 3, 2008 #1 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.
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.
Feb 4, 2008 #2 ranjit Technical User Apr 14, 2000 131 GB [tt] Perhaps using an array: $ cat script {a[NR]=$0} END { for(i=57;i<=NR;i++) print a } $ awk -f script datafile [/tt] Upvote 0 Downvote
[tt] Perhaps using an array: $ cat script {a[NR]=$0} END { for(i=57;i<=NR;i++) print a } $ awk -f script datafile [/tt]
Feb 4, 2008 2 #3 geirendre Vendor Aug 13, 2001 603 NO Code: awk 'NR > 56' /path/to/originalfile.txt > newfile.txt http://www.student.northpark.edu/pemente/awk/awk1line.txt HTH Upvote 0 Downvote
Code: awk 'NR > 56' /path/to/originalfile.txt > newfile.txt http://www.student.northpark.edu/pemente/awk/awk1line.txt HTH
Feb 4, 2008 Thread starter #4 globemast Programmer Jun 24, 2006 7 CY Thanks geirendre, That worked fine. Thanks also to everyone else that replied to this question. Upvote 0 Downvote