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 |
Print the 10th line without using tail and head command.
What is a file basename?
What is the difference between running a script as ./scriptname.sh and sh scriptname.sh
What are environment variables?
How do I run a bin bash script?
How can I Debug a shell scripts and Perl scripting?? or How do you debug a shell scripting and perl scripting ( at the compile time error or run time error) in Unix environment ?
Write a shell program to test whether a given number is even or odd?
What is use of "cut" command?
What are the different methods available to run a shell script?
how to delete all the files with extension .dat rom a directory tree from root to third level in a single unix command?
is this growing field and what is average package in this?
c program to check whether all the directories in the path exists has read and write permission