Question: Problem 13 points Write a bash script that takes positional parameters. The input reads a string. The script displays one of two things 1. The

 Problem 13 points Write a bash script that takes positional parameters.

Problem 13 points Write a bash script that takes positional parameters. The input reads a string. The script displays one of two things 1. The position of that string in the positional parameters 2. Display "NULL" if the string is not one of the positional parameters For example (red is the user input, blue is the output) \% bash labtest1_1B.sh this is the list the %3 Since the third positional parameter is "the" File name: labtest1_1B.sh Problem 2. 4 points Write a bash script that reads two integers (n and m ). If these two numbers could be the sides (legs) of a right-angle triangle with integer hypotenuse or not. Just display YES or NO File name: labtest1_2Bs.h Test 1 EECS2032 1 Problem 3. 3 points Write a shell script that reads from the standard input a file name. It checks if this file does exist in the current directory or not. - If the file does exist, and is a directory, display "This file is a directory" - If the file does exist and is not a directory, display "This file does exist and has m lines (where m is the number of lines in the file) - If the file does not exist, display "This file does not exist" Filename: labtest1_3B.sh Problem 4. 5 points Read integers from the standard input each integer on a separate line. The input sequence should be increasing in magnitude and alternating in sign (1,3,4,6,8,12,15,) The scripts terminates when this pattern is broken and display the offending integer (note that the sequence might start with a positive or negative number)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!