The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 05-20-2006
Vikas Sood Vikas Sood is offline
Registered User
 

Join Date: May 2006
Posts: 32
Question got some lead

Thanks both of you, for your replies. The examples that I cited were from ksh actually. I did come across some places and found out that == is equality operator used in arirthmatic operations (e.g. to compare two strings) whereas = is simply an assignment operator.

I guess I am still a little bit confused as far as the different brackets are concerned i.e. is my understand correct per following:

1. (commands...) - open a subshell and execute commands in that subshell ??
2. ((commands...)) - i have no idea about this one.

As far as [ $var1 -eq 0 ] and [[ $var1 -eq 0 ]] type of brackets are concerned, i guess they are equivalent and are used to test whether var1 is set to 0.

Thanks once again
Vikas
Reply With Quote