0

how to add to last line in echo command

I have created a text file with many lines, while i give echo " SOME CONTENT" > file.txt it removes all my codes. I just need to add the new line to that file how to do??

Echo Linux Advanced commands Add a comment
grayson
asked May 12 2017

Answer

0

If you want to add new line into file using the echo command as given below,

echo ""content"" > file , in this command has been used to overwrite the content into the file.

Echo ""content"" >> file, in this command has been used to add new content into the file."
Add a comment
linuxhelp
asked Jan 14 2019
edited Jan 14 2019
Post your Answer