When I’m working on a little bash script, I’ll often make a backup, each time I save and test. Then I can revert back, if I need to. The syntax I’ll use is to cp and then curly-bracket the output into .bak files (that’s a 90s era file extension I use for such nonsense):
So if I’m writing a script called MYSCRIPT.sh:
The resultant backup of the script is MYSCRIPT.sh.bak.
krypted March 22nd, 2016