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 it mean by #!/Bin/sh or #!/Bin/bash at the beginning of every script?
How do scripts work?
Why do we use shell scripting?
What is a boot block?
How to get script name inside a script?
What is the purpose of scripting?
What are the zombie processes?
Explain about non-login shell files?
What is the conditional statement in shell scripting?
How will you connect to a database server from linux?
How do you create a shortcut in linux?
Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.
How can I send a mail with a compressed file as an attachment?
Why is a script important?
Explain about gui scripting?