Linux shell is known as a very handful tool when it comes to automation. Some of the commands however require multiple arguments to be passed. For example qemu is typically called with several arguments, meaning of which may not be obvious at first. Some of the users tend to write bash scripts that define multiple variables and at the end call the desired command using variables as arguments. This way arguments can be commented and the whole statement can take several lines. This however introduces an extra work which fortunately can be avoided by using approach presented below.

The idea here is to use a simple script called cmd that takes your text file and does the following:
1. Filters out all the lines that begin with hash (comments)
2. Reads the first line and takes it as a command
3. Appends remaining lines as parameters
4. Calls the whole statement and returns exit value

The script can be found here. It is recommend to copy it to your /usr/bin directory. After that we cat give it a try by creating our first cmd script. Let's create create_dummy file and write the following:

#!/usr/bin/cmd

####################################################################
# This script uses dd command to create a dummy file full of zeros #
####################################################################

# Invoke dd command
dd if=/dev/zero bs=1 count=0

# output file of your choice
of=dummy

# seek offset determines size of your file 
seek=1000

The script will be used to create a dummy file by invoking dd command with certain arguments. As can be observed, the call can take multiple lines and can include comments for each argument, which can be very helpful for the user.

Now it's time to test the script. It can be executed by invoking:

cmd create_dummy

or simply by typing:

./create_dummy

Our dummy file should be created as a result.

Please note that using the second option is possible thanks to having shebang in the first line of the file and only after adding +x attribute by invoking following command in prior:

chmod +x create_dummy