Answers

Question and Answer:

  Home  Linux Shell

⟩ What is the output of this program? #!/bin/bash var1=10 $var1=20 echo $var1 exit 0 a) program will print 10 b) program will generate a warning message c) program will print 20 d) both (a) and (b)

d) both (a) and (b)

Explanation:

The doller sign ($) is used to access a variable's value, not to define it.

Output:

root@ubuntu:/home/google# ./test.sh

./test.sh: line 3: 10=20: command not found

10

root@ubuntu:/home/google#

 150 views

More Questions for you: