Edit
Try:
BLACKRAY_END_POINT="'default -p 8890'"
or
BLACKRAY_END_POINT='"default -p 8890"'
or
BLACKRAY_END_POINT="default\ -p\ 8890"
or
BLACKRAY_END_POINT='default\ -p\ 8890'
and
BLACKRAY_INDEX_CMD="$BLACKRAY_BIN_PATH/blackray_loader -c $BLACKRAY_LOADER_DEF_PATH/$BLACKRAY_LOADER_DEF_NAME -d $BLACKRAY_CSV_PATH -e $BLACKRAY_END_POINT"
Original answer :
Is blackray_loader a shell script?
Here is a demonstration that you should deal with this problem both when specifying a parameter and when processing it:
A text file called test.txt (including line numbers):
1 two words 2 two words 3 two 4 words
A script called "spacetest":
#!/bin/bash echo "No quotes in script" echo $1 grep $1 test.txt echo echo "With quotes in script" echo "$1" grep "$1" test.txt echo
Launch with ./spacetest "two--------words" (replace hyphens with spaces):
No quotes in script two words grep: words: No such file or directory test.txt:1 two words test.txt:2 two words test.txt:3 two With quotes in script two words 2 two words
You can see that in the “No quotes” section, he tried to make grep two words test.txt , which interpreted the “words” as a file name in addition to “test.txt”. In addition, echo dropped extra spaces.
When a parameter is quoted, as in the second section, grep saw it as a single argument (including extra spaces) and processed it correctly. And echo kept extra spaces.
I used extra spaces, by the way, just to help with the demo.
Dennis williamson
source share