diff options
author | devzero2000 <devzero2000> | 2014-03-28 17:10:13 +0000 |
---|---|---|
committer | devzero2000 <devzero2000> | 2014-03-28 17:10:13 +0000 |
commit | 3a593fff42c04e64f402d41718973ad21987b073 (patch) | |
tree | 367fae4e3042158bec739eb1d8f7b1b328994057 /testit.sh | |
parent | 6c2ff1581491ceed4ac1318da2de98c148fe4085 (diff) | |
download | libpopt-3a593fff42c04e64f402d41718973ad21987b073.tar.gz |
This patch series changes everywhere the back-quotes construct for command
substitution with the $( ... ).
The backquoted form is the historical method for command substitution,
and is supported by POSIX. However, all but the simplest uses become
complicated quickly. In particular, embedded command substitutions
and/or the use of double quotes require careful escaping with the backslash
character. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell. Because this construct uses distinct
opening and closing delimiters, it is much easier to follow.
Also now the embedded double quotes no longer need escaping.
Diffstat (limited to 'testit.sh')
-rwxr-xr-x | testit.sh | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -30,14 +30,14 @@ if [ -z "${valgrind_environment}" ] then MALLOC_CHECK_=3 export MALLOC_CHECK_ - [ -n "${RANDOM}" ] && MALLOC_PERTURB_=`expr \( $RANDOM % 255 \) + 1 ` + [ -n "${RANDOM}" ] && MALLOC_PERTURB_=$(expr \( $RANDOM % 255 \) + 1 ) export MALLOC_PERTURB_ # if [ -z "${MALLOC_PERTURB_}" ] # RANDOM is a bashism then - r=`ps -ef | cksum | cut -f1 -d" " 2>/dev/null` + r=$(ps -ef | cksum | cut -f1 -d" " 2>/dev/null) [ -z "${r}" ] && r=1234567890 - MALLOC_PERTURB_=`expr \( $r % 255 \) + 1 ` + MALLOC_PERTURB_=$(expr \( $r % 255 \) + 1 ) export MALLOC_PERTURB_ fi fi @@ -49,7 +49,7 @@ run() { echo Running test $name. - result=`HOME=$builddir $builddir/$prog $* 2>&1` + result=$(HOME=$builddir $builddir/$prog $* 2>&1) if [ "$answer" != "$result" ]; then echo "Test \"$prog $*\" failed with: \"$result\" != \"$answer\" " @@ -81,7 +81,7 @@ run_diff() { rm $out $diff_file } -builddir=`pwd` +builddir=$(pwd) #srcdir=$builddir cd ${srcdir} test1=${builddir}/test1 |