Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #-------- BLACKRAY CONFIG ---------------#
- # Make sure the current user is in the sudoers list
- # Running all instances with sudo
- BLACKRAY_BIN_PATH='/opt/blackray/bin'
- BLACKRAY_LOADER_DEF_PATH='/home/crozzfire'
- BLACKRAY_LOADER_DEF_NAME='load.xml'
- BLACKRAY_CSV_PATH='/home/crozzfire'
- BLACKRAY_END_POINT='default -p 8890'
- OUT_FILE='/tmp/out.log'
- echo "The current binary path is $BLACKRAY_BIN_PATH"
- # Starting the blackray 0.9.0 server
- sudo "$BLACKRAY_BIN_PATH/blackray_start"
- # Starting the blackray loader utility
- 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"""
- sudo time $BLACKRAY_INDEX_CMD -a $OUT_FILE
- #--------- END BLACKRAY CONFIG ---------#
- BLACKRAY_END_POINT="'default -p 8890'"
- BLACKRAY_END_POINT='"default -p 8890"'
- BLACKRAY_END_POINT="default -p 8890"
- BLACKRAY_END_POINT='default -p 8890'
- 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"
- 1 two words
- 2 two words
- 3 two
- 4 words
- #!/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
- 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
- sudo time $BLACKRAY_BIN_PATH/blackray_loader -c $BLACKRAY_LOADER_DEF_PATH/$BLACKRAY_LOADER_DEF_NAME -d $BLACKRAY_CSV_PATH -e "$BLACKRAY_END_POINT" -a $OUT_FILE
- 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")
- sudo time "${BLACKRAY_INDEX_CMD[@]}" -a $OUT_FILE
Add Comment
Please, Sign In to add comment