Skip to main content
IBM 
ShopSupportDownloads
IBM HomeProductsConsultingIndustriesNewsAbout IBM
IBM : developerWorks : Linux : Education - Tutorials
LPI certification 101 exam prep, Part 2
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPrevious
Next Section
5. Text processing
  


Using >> page 14 of 14


You would expect >> to be somehow analogous to <<, but it isn't really. It simply means to append the output to a file, rather than overwrite as > would. For example:


$ echo Hi > myfile
$ echo there. > myfile
$ cat myfile
there.

Oops! We lost the "Hi" portion! We meant this:


$ echo Hi > myfile
$ echo there. >> myfile
$ cat myfile
Hi
there.

Much better!


Next Section
Main menuSection menuFeedbackPrevious
PrivacyLegalContact