From 691ace13d56c91edcd917ed29f6718f2f2cea506 Mon Sep 17 00:00:00 2001 From: Lewis Gentry <8uuuuu@gmail.com> Date: Mon, 14 Feb 2011 17:34:33 -0500 Subject: [PATCH] prefer printf to echo for non-bash shells --- scripts/mass-thumbnailer | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/mass-thumbnailer b/scripts/mass-thumbnailer index 9d7ead1..34b425c 100755 --- a/scripts/mass-thumbnailer +++ b/scripts/mass-thumbnailer @@ -29,22 +29,22 @@ done shift $(($OPTIND - 1)) if [ $# = 0 ]; then - echo "Test thumbnailer against arguments and report exit status." - echo "Resulting thumbnails are written to the current directory." - echo "Example: sh $0 corpus/*.?blorb" - echo "General usage: $0 [options] [files]" - echo "Options: -c path/to/alternate-thumbnailer [default $canonical]" - echo " -s 120 [thumbnail size in pixels square]" + printf "Test thumbnailer against arguments and report exit status.\n" + printf "Resulting thumbnails are written to the current directory.\n" + printf "Example: %s corpus/*.?blorb\n" $0 + printf "General usage: %s [options] [files]\n" $0 + printf "Options: -c path/to/alternate-thumbnailer [default %s]\n" $canonical + printf " -s 120 [thumbnail size in pixels square]\n" exit fi if [ $program_name = $canonical ] && [ ! -e $canonical ]; then - echo $canonical not found. + printf "%s not found.\n" $canonical exit fi for pathname in "$@"; do basename=`basename "$pathname"` "$program_name" "$pathname" "$basename.png" $size > /dev/null - echo -e $? "\t" $pathname + printf %d\\t%s\\n $? "$pathname" done -- 2.11.4.GIT