Categories
Development Linux

Ways to append text to a file

I always do this to append text to a file

echo "text text text ..." >> file
# or
printf "%s\n" "text text text ..." >> file

I wonder if there are more ways to achieve the same, more elegant or unusual way.

Leave a Reply

Your email address will not be published. Required fields are marked *