This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem with single quotes


Hi all
I am new in cygwin as well as linux and I am trying to learn shell scripting
I tried to write following script which doesn't give me appropriate result.

x=3
y='[ $x -eq 10 ]'
z='[ $x -lt 10 ]'
echo x=&x y=$y z=$z

and the output is:
x=5 y=[ $x -eq 10 ] z=[ $x -lt 10 ]

I expected
x=5 y=0 z=1
or x=5 y=1 z=0 ( I am not sure till now that whether 0 is true or 1 is true)
-- 
View this message in context: http://www.nabble.com/Problem-with-single-quotes-tp24249272p24249272.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]