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 $@ mean bash?

1240


What can scripts do?

1159


What is the use of echo in shell script?

1054


What are the four fundamental components of every file system on linux?

1725


Can you write a script to portray how set –x works?

1040


How to print all the arguments provided to the script?

993


How do I run a shell script on a mac?

1183


How do I run a .sh file?

1072


What are the advantages of shell scripting?

1088


Is powershell a bash?

1122


What is awk script?

1023


What is the use of a shebang line?

1255


What is gui scripting?

1179


What is sudo command?

1102


Give some situations where typing error can destroy a program?

1291