bash - How to Pass Quotes "" in a shell argument to java with argument containing white spaces -


i trying execute following command

./launch.sh -version 212 -file "/root/desktop/local test/list.csv" 

the launch.sh assigns arguments variable my_variable

when value assigned quotes around file path removed , echo $my_variable gives following result:

./launch.sh -version 212 -file /root/desktop/local test/list.csv 

now launch.sh calls java , gives my_variable argument

but java splits argument file , try process /root/desktop/local , end error while should taking /root/desktop/local test/list.csv.

how can ignore white spaces in java argument or keep quotes while assigning value variable make sure give correct arguments.

you can try add 2 escaped quotes ( \" ) this:

"\"/root/desktop/local test/list.csv\"" 

Comments

Popular posts from this blog

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -

Qt4: how to send QString inside a struct via QSharedMemory -