diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2011-03-10 19:54:44 -0500 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2011-03-10 21:10:41 -0500 |
commit | 06c29bbd5d1ad0542d8de4a6661bd8366d9c56d5 (patch) | |
tree | 33ed8ecbff72b73a99711f24e6fa6e785d7587cd /examples/data/scripts/download.sh | |
parent | bfbd8eaf428b8cf04c88cc7acdcf9230c82120b4 (diff) |
Quote variables which may contain spaces
Diffstat (limited to 'examples/data/scripts/download.sh')
-rwxr-xr-x | examples/data/scripts/download.sh | 10 |
1 files changed, 5 insertions, 5 deletions
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" |