Questions

  1. How many comments are in the following code?
#!/bin/bash
# Welcome to shell scripting
# Author: Mokhtar
  1. If we have the following code:
#!/bin/bash
echo $1
echo $2
echo $3

And we run the script with these options:

$ ./script1.sh -a -b50 -c

What is the result of running this code?

  1. Check the following code:
#!/bin/bash
shift
echo $#

If we run it with these options:

$ ./script1.sh Mokhtar -n -a 35 -p
    1. What is the result?
    2. What is the dropped parameter?