Machtelt Garrels writes great manuals.
http://tille.garrels.be/training/bash/
Probably all you need is this, based on your original post. You need to tell the script where to find bash:
Code:
#!/bin/bash
mkdir /home/user/_1_
mkdir /_1_
I've written only a few scripts and most of them are just "do this," then "do this," and so on.
One lesson I have learned is to test the commands, write the script, then test the script. And test the script. And test the script.
Klaatu did a great tutorial on bash scripting in his July 12, 2010, podcast. Unfortunately, he doesn't provide a way to link to specific episodes, but here's
his website. Look for episode 5x16.