What is the use of "test" command?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / manhar chavan
Simply test command is compare two values. it check whether
it is right or wrong.
| Is This Answer Correct ? | 0 Yes | 0 No |
Calculate a real number calculation directly from the terminal and not any shell script.
What is the use of a shebang line?
Why is a script important?
How to rename all the files in a folder having specific extension? Example: I have some files with extension (.txt) in a folder name 'Test'. I have to rename all the .txt files in a test and its subdirectories to .my extension.
What will happen to my current process when I execute a command using exec?
How can I send a mail with a compressed file as an attachment?
Is shell and terminal the same?
what are bootlevel in linux?which level is booting by default.
What is wc in shell script?
What is shell and terminal?
What is console line?
how to find weblogic version through linux cammand