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 use 'single quotes' to operate on a path that contains spaces:
cp '/path/with spaces/file.txt' '/another/spacey path/dir'
grep foo '/my/super spacey/path with spaces/folder/*'
in a script:
#!/bin/bash
spacey_dir='My Documents'
spacey_file='Hello World.txt'
mkdir '$spacey_dir'
touch '${spacey_dir}/${spacey_file}'