aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/scripts/download.sh
diff options
context:
space:
mode:
authorGravatar Ben Boeckel <MathStuf@gmail.com>2011-03-10 21:09:03 -0500
committerGravatar Ben Boeckel <MathStuf@gmail.com>2011-03-10 22:32:50 -0500
commit5f2a6b9371fcf2ca78143cd255242e1cacac6ad1 (patch)
tree99ed27b7f261673b85c13bf222ed36b02d67cf76 /examples/data/scripts/download.sh
parent8e1eee5059058a774ba3124ce18d5f0d52415202 (diff)
Use printf rather than echo
Diffstat (limited to 'examples/data/scripts/download.sh')
-rwxr-xr-xexamples/data/scripts/download.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/data/scripts/download.sh b/examples/data/scripts/download.sh
index 7753bd6..448e086 100755
--- a/examples/data/scripts/download.sh
+++ b/examples/data/scripts/download.sh
@@ -11,7 +11,7 @@
# the URL that is being downloaded
uri="$1"
-safe_uri="$( echo "$uri" | sed -e 's/\W/-/g' )"
+safe_uri="$( printf "$uri" | sed -e 's/\W/-/g' )"
# a filename suggested by the server or based on the URL
suggested_filename="${2:-$safe_uri}"
@@ -24,4 +24,4 @@ content_type="$3"
total_size="$4"
# just save the file to the default directory with the suggested name
-echo "$UZBL_DOWNLOAD_DIR/$suggested_filename"
+printf "$UZBL_DOWNLOAD_DIR/$suggested_filename\n"