1 | initial version |
To add text to a new line in a file using a Bash script, you can use the following command:
echo "new line text" >> file.txt
This will append the text "new line text" to the end of the file on a new line. The >>
symbol tells Bash to append the text rather than overwrite the file, and the echo
command outputs the text to the console, which is then redirected to the file using the >>
symbol.