Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Difference between using echo with one greater than sign and two greater than signs

I am reading the Kafka documentation. In step 6 of 1.3, there’s the following code:

> echo foo> test.txt
> echo bar>> test.txt

I would like to ask what is the difference between using one greater than sign and two greater than signs. Thanks.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

  • the former recreate the file on each invocation
  • the later append to file. Create the file the first time if not exists

Check

man bash | less +/'Redirecting Output'
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading