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 "test"? How it is used in shell scripting?

Answer Posted / swaroopa

The test command is particularly useful in this context
allowing a variety of conditions to be checked for. There
are two equivalent syntaxes.

test expression

and
[ expression ]

The following simple example will list all the
subdirectories of the current directory.


for i in *
do
if [ -d $i ]
then
echo $i
fi
done

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does debug script mean?

1020


What is a scripting language simple definition?

1161


Is shell scripting a programming language?

1095


What does echo $0 do?

1025


Write a command sequence to find the count of each word?

1032


How to print the first array element?

1088


What is scripting used for?

1093


What are the advantages of using shell scripts?

1113


What are the different types of shell scripting?

1175


Write a script to print the first 10 elements of fibonacci series.

2409


What is difference between shell and bash scripting?

1044


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

1044


Explain about the slow execution speed of shells?

1275


What is subshell?

991


What is the equivalent of a file shortcut that we have a window on a linux system?

1182