Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Deleting the first line of a file

by plaid (Chaplain)
on Apr 06, 2000 at 03:17 UTC ( #6987=note: print w/replies, xml ) Need Help??


in reply to Deleting the first line of a file

Just to throw out another way to do it, you could try something along the lines of
perl -ni -e 'if (2 .. eof) { print }' <file>
Not too different from brott's example, but it's always interesting to see different ways to do the same thing.

Replies are listed 'Best First'.
RE: Re: Deleting the first line of a file
by jbert (Priest) on Apr 06, 2000 at 16:06 UTC
    And to ice the cake...
    perl -pi -e 'BEGIN{<>}' files you want to munge

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://6987]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2022-05-20 08:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (73 votes). Check out past polls.

    Notices?