in reply to Re: Deleting first and last lines of a text file
in thread Deleting first and last TWO(2) lines of a text file
Hi I tried the code like this and got error as
syntax error at ./perl_deletelines.pl line 5, near "-ne" Execution of ./perl_deletelines.pl aborted due to compilation errors. </P
#!/usr/bin/perl use strict; use warnings; perl -i.old -ne 'print unless $.==1 or eof' /home/file_20140407.txt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Deleting first and last lines of a text file
by 2teez (Vicar) on May 16, 2014 at 10:06 UTC | |
by vsmeruga (Acolyte) on May 16, 2014 at 10:21 UTC | |
by 2teez (Vicar) on May 16, 2014 at 11:04 UTC | |
by vsmeruga (Acolyte) on May 16, 2014 at 13:33 UTC | |
by vsmeruga (Acolyte) on May 16, 2014 at 10:13 UTC | |
by 2teez (Vicar) on May 16, 2014 at 10:53 UTC |