Question I
This question carries 20% of the marks for this
assignment.
You are asked to develop a set of bash shell script:
- Write a script that asks for the user's salary per month. If it
is less or equals to 800, print a message saying that you need to
get another job to increase your income, what you earn is the Minim
living cost. If the user's salary is higher than 800 and below
2000, print a message telling the user that your income is just
right to cover your expenses. [10 marks]
- Write a script that takes exactly one argument, a file name. If
the number of arguments is more or less than one, print a usage
message. If the argument is not a file name, print another message.
For the given file, print on the screen its content. [5 marks]
- Write a script that does the following [5 marks]
- Display the name of the script being executed.
- Display the second, third and fifth argument given to the
script.
- Display the total number of arguments passed to the
script.
- Print all the values of the remaining arguments.
- Print the number of arguments