Kaydet (Commit) ca21a875 authored tarafından Jiří Techet's avatar Jiří Techet

Don't use "echo -n" in shell scripts

The standard says:

If the first operand is -n, or if any of the operands contain a
backslash ( '\' ) character, the results are implementation-defined.

On OS X it simply prints the "-n" string and everything which follows,
including the newline.

Use printf instead.
üst 47a5b9fc
......@@ -27,7 +27,7 @@ EOF
# Print a nice top bar
# description + ' : ' + value
total=`expr $dlen + 3 + $vlen`
for i in `seq 1 $total`; do echo -n '-'; done
for i in `seq 1 $total`; do printf '-'; done
echo
# And print the actual content
......
......@@ -92,7 +92,7 @@ else
do
# maybe the regexp can be optimized, regexps are not my best friends
creationdate=`grep "PO-Revision-Date:" po/$lang.po | sed 's/.*: \([0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\} [0-9]\{2\}:[0-9]\{2\}[+|-][0-9]\{4\}\).*/\1/'`
echo -n $eswitch $lang"\t("$creationdate"):\t"
printf "%s %s\t(%s):\t" "$eswitch" "$lang" "$creationdate"
msgfmt --check --statistics po/$lang.po;
done
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment