in reply to Re^2: Deleting first and last lines of a text file
in thread Deleting first and last TWO(2) lines of a text file
The script given to you by morgon is a oneliner, which you should "run" from your command line interface, not from your a script.
If you want a full script of the oneliner this would do:
putting the above in a script should work.BEGIN { $^I = ".old"; } LINE: while ( defined( $_ = <ARGV> ) ) { print $_ unless $. == 1 or eof; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Deleting first and last lines of a text file
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 | |
|
Re^4: Deleting first and last lines of a text file
by vsmeruga (Acolyte) on May 16, 2014 at 10:13 UTC | |
by 2teez (Vicar) on May 16, 2014 at 10:53 UTC |