Basically, a shell script is a collection of shell commands. You can simply run any bash shell command inside a shell script. In this tutorial, you will find some special ways to execute shell commands in a bash script to archive specific tasks.
You can use any shell command under backquotes (
) and store their output in a variable.
date +"%d%b%Y"$ echo $VAR 04Sep2017
You can also run any commands in backslashes with other commands. For example to create a directory with the current date in a script.
date +"%d%b%Y"$ mkdir /backup/db/$VAR
Or you can specify in single command.
$ mkdir /backup/db/