From 06c29bbd5d1ad0542d8de4a6661bd8366d9c56d5 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 10 Mar 2011 19:54:44 -0500 Subject: Quote variables which may contain spaces --- examples/data/scripts/download.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'examples/data/scripts/download.sh') diff --git a/examples/data/scripts/download.sh b/examples/data/scripts/download.sh index a382d9f..561ac31 100755 --- a/examples/data/scripts/download.sh +++ b/examples/data/scripts/download.sh @@ -9,17 +9,17 @@ . "$UZBL_UTIL_DIR/uzbl-dir.sh" # the URL that is being downloaded -uri=$1 +uri="$1" # a filename suggested by the server or based on the URL -suggested_filename=${2:-$(echo "$uri" | sed -e 's/\W/-/g')} +suggested_filename="${2:-$(echo "$uri" | sed -e 's/\W/-/g')}" # the mimetype of the file being downloaded -content_type=$3 +content_type="$3" # the size of the downloaded file in bytes. this is not always accurate, since # the server might not have sent a size with its response headers. -total_size=$4 +total_size="$4" # just save the file to the default directory with the suggested name -echo $UZBL_DOWNLOAD_DIR/$suggested_filename +echo "$UZBL_DOWNLOAD_DIR/$suggested_filename" -- cgit v1.2.3