How to create scripting

Problem:
You would like to create and script file to process one or more commands.

Solution:
1.- create a new file:
nano my_script.sh

2.- inside the file add your commands, I create a shorcut to Motion configuration from my current directory
nano /etc/motion//motion.conf

3.- run the script to test it:
sh my_script.sh