diff options
author | Brendan Taylor <whateley@gmail.com> | 2011-03-13 21:49:27 -0600 |
---|---|---|
committer | Brendan Taylor <whateley@gmail.com> | 2011-03-13 21:49:27 -0600 |
commit | 32f6f8360684c0b583e613cf5727f0c102438bd2 (patch) | |
tree | f36a5441ca4c075687649740a0143bddee189be1 /examples/data/scripts/download.sh | |
parent | 5ec505fdb007d22bcfb5631e88e67038b06d778a (diff) |
sh scripts: replace print with echo/printf
we can safely use echo in many of the situations where 'print' is being
used, and we can use printf directly in other places.
Diffstat (limited to 'examples/data/scripts/download.sh')
-rwxr-xr-x | examples/data/scripts/download.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/data/scripts/download.sh b/examples/data/scripts/download.sh index 8b4761f..7753bd6 100755 --- a/examples/data/scripts/download.sh +++ b/examples/data/scripts/download.sh @@ -7,12 +7,11 @@ # if nothing is printed to stdout, the download will be cancelled. . "$UZBL_UTIL_DIR/uzbl-dir.sh" -. "$UZBL_UTIL_DIR/uzbl-util.sh" # the URL that is being downloaded uri="$1" -safe_uri="$( print "$uri" | sed -e 's/\W/-/g' )" +safe_uri="$( echo "$uri" | sed -e 's/\W/-/g' )" # a filename suggested by the server or based on the URL suggested_filename="${2:-$safe_uri}" @@ -25,4 +24,4 @@ content_type="$3" total_size="$4" # just save the file to the default directory with the suggested name -print "$UZBL_DOWNLOAD_DIR/$suggested_filename\n" +echo "$UZBL_DOWNLOAD_DIR/$suggested_filename" |