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
Submitted by: Murtazad) all of the mentioned
Submitted by: Murtaza
Submitted by: Murtaza
Read Online Bash Arithmetic Expressions Job Interview Questions And Answers
Top Bash Arithmetic Expressions Questions
☺ | Which command puts a script to sleep untill a signal is recieved? |
☺ | Which statement resumes the next iteration of a for, while, select, or until loop? |
☺ | Which command sets up shorthand for command or command line? |
☺ | Which command concatenate the specified argument into a single command, then execute the command? |
☺ | Which command identifies the resource of a command? |
Top Linux OS Categories
☺ | Device Drivers Interview Questions. |
☺ | Linux OS Management Interview Questions. |
☺ | Linux Makefile Interview Questions. |
☺ | Linux Environment Interview Questions. |
☺ | Linux OS Shell Interview Questions. |