]> www.infradead.org Git - users/dedekind/aiaiai.git/commitdiff
email-test-patchset: remove a useless variable
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Wed, 5 Feb 2014 12:41:30 +0000 (14:41 +0200)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Wed, 5 Feb 2014 15:12:12 +0000 (17:12 +0200)
This is another cosmetic clean-up. Just trying to make this script a bit
smaller and more readable. Remove the 'msgname' variable since we only use it
once.

Also, substitute 'echo' with 'printf', since we are trying to not using echo as
a general policy, see this URL for more infor why echo may be dangeros and
printf is safe:

http://unix.stackexchange.com/questions/65803/why-is-printf-better-than-echo

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
email/aiaiai-email-test-patchset

index 3abc96040d398bc62c9e9cf52f0a982e9ebe451b..040e5d7e0129e66d65ef1405a254f516bcf1b44f 100755 (executable)
@@ -278,10 +278,9 @@ fi
 fetch_header_or_die subj "Subject" < "$mbox"
 fetch_header_or_die from "From" < "$mbox"
 fetch_header_or_die id "Message-Id" < "$mbox"
-msgname="$from: $subj (Message-Id: $id)"
 
-echo >&2
-verbose "Testing mbox: \"$msgname\""
+printf "\n"
+verbose "Testing mbox: \"$from: $subj (Message-Id: $id)\""
 verbose "parsing config file \"$cfgfile\""
 
 parse_config "$cfgfile"