👩💻 Join our community of thousands of amazing developers!
In Bash, we can add contents to file easily using the > character. Like this : echo "myContents" > ~/myfile.txt What if you want to append contents to the file without overwriting ? The easiest way to do this is change the ">" to ">>". Just by making this small change, appending will be done : echo "myContents" >> ~/myfile.txt Even if the file doesn’t exist, Bash will create one with the contents given to append....