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 command needs to be used to take the backup?

990


What is the syntax of "nested if statement" in shell scripting?

1099


When should shell programming/scripting not be used?

1158


What are zombie processes?

1030


What is shell prompt?

1020


What is an inode block?

1058


What exactly is a shell?

1085


How will you emulate wc –l using awk?

1537


What does egrep mean?

969


What is bash eval?

1017


What is computer cli?

909


What is shell variable?

923


What is shell environment?

998


How to redirect both standard output and standard error to the same location?

1173


Why are there shells on the beach?

1155