Vidyalelo
Computer Science · Q451

Linux

Engineering and GATE · Computer Science · question 451

Q451

What is the output of this program? #!/bin/bash echo "Which file do you want to check" read x until [ -e x ] do echo "The file does not exist. Do you want to create? y/n" read a if [ a = y ]; then touch x echo "Your file has been created successfully." fi done echo "The file is present in this directory" exit 0

A.
it checks the existance of your entered file in the present working directory
B.
it creates the file if file does not exists
C.
program runs untill you create the file
D.
all of the mentioned
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board