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 does $@ mean bash?
What can scripts do?
What is the use of echo in shell script?
What are the four fundamental components of every file system on linux?
Can you write a script to portray how set –x works?
How to print all the arguments provided to the script?
How do I run a shell script on a mac?
How do I run a .sh file?
What are the advantages of shell scripting?
Is powershell a bash?
What is awk script?
What is the use of a shebang line?
What is gui scripting?
What is sudo command?
Give some situations where typing error can destroy a program?