How to get bash to insert ' in the output

Posted by ~danieljamesthomas on Stack Overflow See other posts from Stack Overflow or by ~danieljamesthomas
Published on 2010-04-08T08:25:30Z Indexed on 2010/04/08 9:43 UTC
Read the original article Hit count: 356

Filed under:
|

Hi everybody,

I'm rather new to bash, and somehow just haven't found out what I'm doing wrong here: (this is a small bash script calling my generator)

    if [ -n $folder ]; then
        $zorbalocation -q $generator -f -e files=\"$lFiles\" -e folder=\"lFolder\"
    else
        $zorbalocation -q $generator -f -e files=\"$lFiles\" -e folder=\".\"
    fi

Now, obviously I want bash to execute these commands, depending on the content of folder. But, for some reason, bash insists on putting apostrophes ( ' ) around files=... and folder =... So, it tries to execute

../../../zorba/build/bin/zorba -q generator.xq -f -e 'files="test.xqlib"' -e 'folder="."'

instead of

../../../zorba/build/bin/zorba -q generator.xq -f -e files="test.xqlib" -e folder="."

Does anybody know why bash insists on inserting the apostrophes there?

A nice day to everyone

Danny

© Stack Overflow or respective owner

Related posts about bash

Related posts about scripting