Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Single line insert to the start of a file

by aaron_baugher (Curate)
on Aug 16, 2012 at 09:57 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2016-10-25 19:57 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (329 votes). Check out past polls.