Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Single line insert to the start of a file

by aaron_baugher (Curate)
on Aug 16, 2012 at 09:57 UTC ( [id://987724]=note: print w/replies, xml ) Need Help??


in reply to Single line insert to the start of a file

Assuming a *nix system, and the existence of a real-world problem to be solved rather than a homework problem in a particular language:

head -1 file1 >/tmp/file.$$; cat file2 >>/tmp/file.$$; mv /tmp/file.$$ file2

Aaron B.
Available for small or large Perl jobs; see my home node.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-03-19 05:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found