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 is awk in shell scripting?
How to get script name inside a script?
What is a shell script in windows?
How do I run a shell script on a mac?
What is a shell in operating system?
What are scripts in psychology?
What is bash eval?
What is a file basename?
What is path in shell script?
How do you know which shell I am using?
How will you print the login names of all users on a system?
I have to write Shells (Linux + Unix)for publishing packages and reports. Is it possible ? What are the differents executable programs ineed to call ?
Explain about the slow execution speed of shells?
I want to create a directory such that anyone in the group can create a file and access any person's file in it but none should be able to delete a file other than the one created by himself.
How do I save a powershell script?