What is "test"? How it is used in shell scripting?

Answer Posted / madhavi

test is used to validate an expression in shell script.
for ex:in if loop ,is used as follows
if test a > b
{
#some statements
}
fi
instead of
if [ a > b ]
{
#some statements
}
fi

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a scripting language simple definition?

549


Explain about debugging?

605


How will you copy a file from one machine to other?

544


write a shell script to check the failed jobs?

3952


What does $@ mean bash?

664






How to print all array elements and their respective indexes?

501


What is batch file programming?

689


How will you pass and access arguments to a script in linux?

578


How can I send a mail with a compressed file as an attachment?

556


What are the advantages of shell scripting?

580


How do I open a jshell in cmd?

595


What does it mean by #!/Bin/sh or #!/Bin/bash at the beginning of every script?

559


What is in a script?

562


Can we run shell script in windows?

577


Is shell scripting easy to learn?

563