i m totally new .... Not getting o/p of below command in shell , plz help to write correct one. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

i m totally new .... Not getting o/p of below command in shell , plz help to write correct one.

A=0 echo $A B=3 if [$A=$B] then echo "ok" else echo "not ok" fi getting error as warning /error :[0=3]: not found

13th Aug 2018, 9:57 PM
ashish
ashish - avatar
3 Answers
+ 1
Relational operators in shell: Equal to -eq Not equal to -ne Greater than -gt Less than -lt Greater than or equal to -ge Less than or equal to -le The solution is [$A -eq $B].
14th Aug 2018, 12:06 AM
Steppenwolf
Steppenwolf - avatar
0
help plz
13th Aug 2018, 9:57 PM
ashish
ashish - avatar
0
thanks Steppenwolf , I had done it
22nd Aug 2018, 8:09 AM
ashish
ashish - avatar