I am trying to put absolute paths into my script and folder/folder\ folder is not being preserved. /folder/folder folder is being returned.
Here is an example:
Code:
#!/bin/bash
clear
read -p "Enter the Absolute Path to Source File/Folder: " Source
read -p "Enter the Absolute Path to Destination File/Folder: " Destination
echo "Usage: ln -vs $Source $Destination"
ln -vs $Source $Destination
cd $Destination; cd ..
ls -lasS
Code:
Enter the Absolute Path to Source File/Folder: /Users/joel/Library/Application\ Support
Enter the Absolute Path to Destination File/Folder: /Users/joel
Usage: ln -vs /Users/joel/Library/Application Support
/Users/joel/Library/Application Support
/Users/joel
computer:~ joel$
Does anyone know how to get the \ escape the be there after being put into a variable?
Thanks,
Joel