cmds='date; date +%N; free; who -a; w; ps auxww; ps ef; netstat -n'
data=$( (eval "$cmds") 2>&1 | gzip )
- n_plus_50=$(expr $n + 50)
+ n_plus_50=$(( n + 50 ))
# Ensure that $data has length at least 50+$n
while :; do
len=$(echo "$data" | wc -c)
- test $n_plus_50 -le $len && break;
+ test "$n_plus_50" -le "$len" && break;
data=$( (echo "$data"; eval "$cmds") 2>&1 | gzip )
done
- echo "$data" | dd bs=1 skip=50 count=$n 2>/dev/null \
+ echo "$data" | dd bs=1 skip=50 count="$n" 2>/dev/null \
| tr -c "$chars" "01234567$chars$chars$chars"
}
for core in $(ls core* 2>/dev/null); do
bin=$(gdb -batch -c "$core" 2>&1 | grep "generated by" | \
sed -e "s,.*generated by \`\([^ ']*\).*,\1,")
- gdb -batch -c "$core" -x gdb_commands.txt $(which "$bin")
+ gdb -batch -c "$core" -x gdb_commands.txt "$(which "$bin")"
done
fi
sed -e "s,^,## STRACE: ," strace.log
fi
dmsetup info -c | grep1_ "$PREFIX" > out
- if test $(wc -l < out) -gt 1 ; then
+ if test "$(wc -l < out)" -gt 1 ; then
echo "<======== Info ========>"
sed -e "s,^,## DMINFO: ," out
echo "<======== Active table ========>"
case "$PATH" in
*"$abs_top_builddir/test/lib"*) ;;
*)
- PATH="$abs_top_builddir/test/lib":"$abs_top_builddir/test/api":$PATH
+ PATH="$abs_top_builddir/test/lib:$abs_top_builddir/test/api:$PATH"
LD_LIBRARY_PATH=$(find -L "$abs_top_builddir/libdm/" "$abs_top_builddir/tools/"\
"$abs_top_builddir/daemons/" "$abs_top_builddir/liblvm/"\
-name "*.so" -printf "%h:")"$LD_LIBRARY_PATH"