QuestionQ11

VerifiedEssential Commands

The script.sh script contains these lines:

#!/bin/bash  
echo $2 $1  

What output appears when the command ./script.sh test1 test2 is entered?

Explanation

In Bash, $1 is the first supplied argument and $2 is the second. echo $2 $1 therefore prints test2 test1.

Community Discussion

No comments yet. Be the first to start the discussion!