Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Exercise #3-reverse.sh-version #1 We want a bash script named reverse.sh which i

ID: 3913544 • Letter: E

Question

Exercise #3-reverse.sh-version #1 We want a bash script named reverse.sh which is able, given two words as positional parameters, to display them in reverse order. Here is an example of how it would be used; tux@LinuxBox > ./reverse.sh first next next first tux@LinuxBox ? To do so, write and test a Bash Script which will; Assign its first parameter to a variable named FIRST Assign its second parameter to a variable named SECOND Displays these two variables one after the other, starting with SECOND Use two echo statements, one for displaying each of the variables

Explanation / Answer

The bash script will be as follows. Tell me if you have any doubts about the code

#reverse.sh

s1=$1
s2=$2
echo s2
echo s1