Search code examples
iosxcoderun-script

Not able to print value using echo


I am using Run Script in Xcode, I am facing some problem

I am declaring variable like below

URL1 = "/Users/UserName/Desktop/Folder/13072012/libRestKit.a"

And below i am printing it echo "Test $URL1 Test" I tried like this also "Test ${URL1} Test"

I am not able to print the URL1 value, below i use this

echo "Hello, world!" and i am able to print this, I am new to scripting What is the problem can any one help me out


Solution

  • Try without spaces:

    URL1="/Users/UserName/Desktop/Folder/13072012/libRestKit.a"
    

    Putting spaces around = is a common error when using bash and other shells of the same family.