From db8bebc94f92d3e39fd884fea56a528e72131893 Mon Sep 17 00:00:00 2001 From: Andrew Parker Date: Wed, 30 Sep 2015 23:58:58 -0600 Subject: [PATCH] I was still getting an error because only the first space in my DOWNLOADDIR was getting replaced. Adding the other / tells the expansion to match all occurrences. --- plexupdate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexupdate.sh b/plexupdate.sh index 053e3c6..9a66919 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -133,7 +133,7 @@ fi # Remove any ~ or other oddness in the path we're given -DOWNLOADDIR="$(eval cd ${DOWNLOADDIR/ /\\ } ; if [ $? -eq 0 ]; then pwd; fi)" +DOWNLOADDIR="$(eval cd ${DOWNLOADDIR// /\\ } ; if [ $? -eq 0 ]; then pwd; fi)" if [ -z "${DOWNLOADDIR}" ]; then echo "Error: Download directory does not exist or is not a directory" exit 1