bash script insert new line into file code example
Example 1: bash add text to file
echo "hello world" >> my_file.txt
Example 2: echo new line
echo -e "hello\nworld"
# Output
/*
* hello
* world
*/
echo "hello world" >> my_file.txt
echo -e "hello\nworld"
# Output
/*
* hello
* world
*/