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
What command needs to be used to take the backup?
What is the syntax of "nested if statement" in shell scripting?
When should shell programming/scripting not be used?
What are zombie processes?
What is shell prompt?
What is an inode block?
What exactly is a shell?
How will you emulate wc –l using awk?
What does egrep mean?
What is bash eval?
What is computer cli?
What is shell variable?
What is shell environment?
How to redirect both standard output and standard error to the same location?
Why are there shells on the beach?