Question: Really having trouble with this Unix problem, any help would be great a) script1.sh : Write a shell script that takes 2 arguments, the first
Really having trouble with this Unix problem, any help would be great
a) script1.sh : Write a shell script that takes 2 arguments, the first one a filename and the second one a number. The script should print the filename to the screen x times using a loop (where x is the number of characters in the filename), and then should check to see if the second argument is a number less than 0. If it is, print out the message Negative. If it is not, print out the message Positive. Separate the looped messages from the last message you display with a blank line. HINT: There are several ways to get the length of a string, so do some searching to find one to use.
As an example, if you run your script using the command ./script1.sh test.sh 46 , your script should display to the screen the following:
test.sh
test.sh
test.sh
test.sh
Positive
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
