The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 02-09-2009
fedora fedora is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 94
best way to insert a line at the top of a file?

say I want to insert "this is a test" as the first line into file A, besides

echo "this is a test" > /tmp/tmpfile

cat /tmp/tmpfile fileA >> /tmp/result,

is there any simple way I can do it? thanks