I am new to shell script. Can someone help me with command to escape the space with \"\\ \". I have a variable FILE_PATH=/path/to my/text file , I want to escape the spa
You can do it with sed :
sed
NEW_FILE_PATH="$(echo $FILE_PATH | sed 's/ /\\ /g')"