UNIX/Linux Programming Answers

Questions: 170

Answers by our Experts: 135

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a script that will accept the sides of a triangle, let them be “a”, “b”, “c”. Based on these


variable values determine if the triangle is right angled or not, by using Pythagoras theorem.


Hint: if c2 = a2 + b2 then the given sides are right angled triangle else not a right-angled triangle

  1. The program displays Five members of the band. The codes for five-star band members are John Lennon, Angus Young, Freddie Mercury, Debbie Harry, and Kurt Cobain are JL, AY, FM, DH, KC respectively.
  2. Then the program invites to type three codes out of these five (the codes may be typed in any sequence.
  3. The user types of these codes separating them by spaces.
  4. The program displays a menu with these three codes and asks to choose one of them.
  5. The user types the number of a chosen code in the list; the user will be able to type numbers until it is one of these three codes.
  6. The program displays the code with a comment on the same line and then, starting from the next line, displays a 3-4 lines description of that player.  The description is taken from a file, which is stored in a directory. If the file with that name is absent or not readable, the program informs the user about that and returns him/her to Step 4. 
  7. The program asks whether the eight previous steps described above, (4) to (11), should be repeated.

There are n processes and six instances of a resource type A. Each process will need two instances of resource type A. You need to specify what can be a maximum number of n if you want to ensure the system without deadlock?


2. Write a script that will accept the sides of a triangle, let them be “a”, “b”, “c”. Based on these variable values determine if the triangle is right angled or not, by using Pythagoras theorem. Hint: if c2 = a2 + b2 then the given sides are right angled triangle else not a right-angled triangle.

3. Write a script that should prompt a user to enter his\her hourly rate, number of hours per day, number of days per week and number of weeks per year. Then the system computes the annual income. Hint: Boyce earns P35 per hour at his job. What would be his annual income be if he works 8 hours per day, 5 days per week, and 50 weeks per year .


1. The university with departments deals with Management Information System and Assessment Department. The school asked you to create 2 files that can be used to store student details and marks. A. Write a script called Student.sh that will accept the following student details: studentID, StudentName, ContactNo and Email. The program should add records to StudentDetails.txt under each heading, at the end of each record the program should prompt you if you want to add more records, if yes it should allow you to continue adding the records.

B. Write a shell script called Grading.sh that accept StudentID and Student Marks and student are graded using this grading criteria: 80 and above, Distinction, 79-60, Merit, 59 -50, Pass, 49-40, Supplement and 39 and below, Fail. The program should add the records to StudentGrades.txt.


Write a a shell script called grading.sh that will accept studentID and grades

hands-on activity software installation and maintenance objective: at the end of the exercise, the students should be able to: • install, update, and remove software. software requirements: • virtualbox for windows • ubuntu iso microsoft word procedure: 1. create a folder name lastname firstname (ex. reyes ranika) in windows. 2. create a word document on your windows pc (outside virtualbox). take screenshots of the following and place them in your document. • result of installing gcc, emacs, and httpd result of the check-update command for gcc, emacs, and httpd result of the check-update command (no specified package) result of the update command for gcc, emacs, and httpd result of the update command (no specified package) result of the remove command for gcc, emacs, and httpd 3. save the document in your windows folder.

A. Demonstrate the process of installing a Linux operating system on a virtual machine. Mention the steps along with the screenshots of the same.

Write a linux bash script that will accept the sides of a triangle, let them be a, b, c. Based on these variable values determine if the triangle is right angled triangle or not, by using Pythagoras theorem.

Hint: if c^2 = a^2 + b^2then the given sides are right angled triangle else not a right angled triangle.


Write a script called Student.sh that will accept the following student details: studentID, StudentName, ContactNo and Email. The program should add records to a file called Student_Details.txt under each heading, at the end of each record the program should prompt you if you want to add more records and if yes it should allow you to continue adding the records.


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS