Question

Question I This question carries 20% of the marks for this assignment. You are asked to...

Question I

This question carries 20% of the marks for this assignment.

You are asked to develop a set of bash shell script:

  1. 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]
  2. 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]
  3. 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

Homework Answers

Answer #1

2)

3)

comment if any doubts

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
NOTE: I just need the answer for question 5 and 6. I already knew the question...
NOTE: I just need the answer for question 5 and 6. I already knew the question 1-4, and wrote down all the requirements for clarification. In this assignment, you are required to write a Bash script, call it assignment2.sh. Your Bash script has to accept at least four input arguments, and must: 1) Print to the user a set of instructions explaining how the PATH variable can be used in Bash. 2) Save the manual of the 'awk' command in...
In UNIX .Write a bash script that takes a list of usernames as its command line...
In UNIX .Write a bash script that takes a list of usernames as its command line arguments and displays on the screen, for each user name, a message of the form Number of times that logged into this machine is where is to be replaced by the number of recors that the last command output that match exactly. For example, if i enter command logincount mark it should output something like number of times that sweiss logged into this machin...
Bash script Suppose you are working as a prof or TA and your students have an...
Bash script Suppose you are working as a prof or TA and your students have an assignment which requires them each to hand in exactly one file. You've got a directory with all of the submitted files in it, and no other files. You're also lucky enough to have a script that will do all the work of marking a submission; it will take the name of a submission file as its only parameter and will print out a single...
You are working for a company that offers driver licence training and you have been asked...
You are working for a company that offers driver licence training and you have been asked to write a script that asks your clients how old they are. If he/she is 16 years old display the message "Please visit our company to take the test!" If he/she is 15 years old display the message "Please take the training with us to learn how to drive!" If he/she enters any other answer display the message. "Please visit out website to see...
PLEASE DO QUICK LINUX ASSIGNMENT PLEASE ILL THUMBS UP You need to paste the command and...
PLEASE DO QUICK LINUX ASSIGNMENT PLEASE ILL THUMBS UP You need to paste the command and the output in a word document and submit it. Part1: 1. Log in to Linux using your user account name and password. 2. If you logged in using a graphical login screen, open a terminal window by clicking on the icon in the lower left corner of the desktop to open the main menu, then selecting System Tools, then Terminal. A terminal window opens....
Save your select statements as a script. Place the semicolon at the end of each SQL...
Save your select statements as a script. Place the semicolon at the end of each SQL statement. Please number your select statements from 1 to 8 in your script and comment out each number. Include your name and student number as a comment at the top of your script. The name of the script has to be Assignment1_JohnSmith. Instead of JohnSmith use your First Name and Last Name. Upload your script trough Blackboard. Use SQL Developer to create the My...
This program is in C++: Write a program to allow the user to: 1. Create two...
This program is in C++: Write a program to allow the user to: 1. Create two classes. Employee and Departments. The Department class will have: DepartmentID, Departmentname, DepartmentHeadName. The Employee class will have employeeID, emploeename, employeesalary, employeeage, employeeDepartmentID. Both of the above classes should have appropriate constructors, accessor methods. 2. Create two arrays . One for Employee with the size 5 and another one for Department with the size 3. Your program should display a menu for the user to...
PYTHON Driver’s License The local driver’s license office has asked you to create an application that...
PYTHON Driver’s License The local driver’s license office has asked you to create an application that grades the written portion of the driver’s license. The paper has 20 multiple-choice questions. Here are the correct answers: A C A A D B C A C B A D C A D C B B D A Your program should store these correct answers in a list. The program should read the student’s answers for each of the 20 questions from a...
Question 1: True, False or uncertain (16 marks) Explain whether each of the following statement is...
Question 1: True, False or uncertain Explain whether each of the following statement is true, false or uncertain. Start your answer by selecting one of the three statements – “True”, “False” and “Uncertain” and then provide arguments to justify your selection (be brief and concise in less than 100 words). You need to make assumption clear, reasonable and explicit if making any. The quality and logic of arguments determine your marks. (4 marks each) If the lockdown measure due to...
For this assignment, you will be creating a simple “Magic Number” program. When your program starts,...
For this assignment, you will be creating a simple “Magic Number” program. When your program starts, it will present a welcome screen. You will ask the user for their first name and what class they are using the program for (remember that this is a string that has spaces in it), then you will print the following message: NAME, welcome to your Magic Number program. I hope it helps you with your CSCI 1410 class! Note that "NAME" and "CSCI...