Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the use of "test" command?

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


Please Help Members By Posting Answers For Below Questions

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

1009


How do scripts work?

1003


Why do we use shell scripting?

941


What is a boot block?

966


How to get script name inside a script?

970


What is the purpose of scripting?

1015


What are the zombie processes?

923


Explain about non-login shell files?

1144


What is the conditional statement in shell scripting?

1174


How will you connect to a database server from linux?

994


How do you create a shortcut in linux?

1128


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.

2155


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

991


Why is a script important?

990


Explain about gui scripting?

1045