Answer Posted / satchi
"Test" command checks file and directory types and checks
value.
EX: create a empty file test (touch test)
if test -f test
then
echo "File is nonempty"
else
echo "file is empty"
fi
There are different options like -d -b -e.You can explore
all.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Write a command sequence to find the count of each word?
Explain about the exit command?
What is scripting autism?
What is a shell script in windows?
What is sudo command?
How do I start a shell script?
write a shell script to check the failed jobs?
Is bash an operating system?
Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.
What are script files?
What are the different types of shell scripting?
What is the syntax of "nested if statement" in shell scripting?
When should shell programming/scripting not be used?
Why is used in shell scripting?
Is bash a shell script?