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
There's more to making a string safe than just escaping spaces, but you can escape the spaces with:
FILE_PATH=$( echo "$FILE_PATH" | sed 's/ /\\ /g' )