How to create an sh shell script that executes commands?

Since I am quite new to sh and Linux shell scripting, I would like to ask you for some help. I now run the following 4 commands in separate terminals:

tendermint init (1) sudo mongod (2) bigchaindb start (3) tendermint node (4)

so I can get my thing started and working. In future, I would like to use 1 single sh script that I can start which will on his turn start each of the 4 commands either in the background (nohuo) or in separate terminals. I tried doing the last using the command screen but did not get it to work somehow. YOu can also see that I will need to hardcode somehow my sudo user when I call the mongod.

Could you suggest how to put the 4 lines in a .sh file that I can quitely exectute ?


Which distro ?