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 is awk in shell scripting?

1017


How to get script name inside a script?

1010


What is a shell script in windows?

1089


How do I run a shell script on a mac?

1125


What is a shell in operating system?

1103


What are scripts in psychology?

1060


What is bash eval?

1009


What is a file basename?

1045


What is path in shell script?

1089


How do you know which shell I am using?

1048


How will you print the login names of all users on a system?

963


I have to write Shells (Linux + Unix)for publishing packages and reports. Is it possible ? What are the differents executable programs ineed to call ?

2171


Explain about the slow execution speed of shells?

1224


I want to create a directory such that anyone in the group can create a file and access any person's file in it but none should be able to delete a file other than the one created by himself.

1032


How do I save a powershell script?

1150