Home Random BASH scripting notes
Post
Cancel

Random BASH scripting notes

Note

Always add this at the top of you script file so there is no confusion which interpretor you are using.

1
#!/bin/bash

To make your script executable:

1
chmod +x filename

Do not have spaces around the equal sign with string assignments.

1
2
3
4
5
#Good
STR="abc"

#Bad
STR = "def"
This post is licensed under CC BY 4.0 by the author.