Search code examples
bashshelltextsededit

Append text to file using sed


How can I write text to a file using sed? More specifically I would it add null variables to my blank text file that was created using touch. The syntax of sed is very confusing to me.


Solution

  • If you're just appending text to the end of the file then you wouldn't use sed in the first place.

    echo "some text" >> somefile.txt