[patch] bashism in sh script
GoTaR
gotar at poczta.onet.pl
Fri Aug 1 08:51:47 UTC 2003
Hi!
There's no thing like $[..] to evaluate expressions in POSIX sh, it's
bash feature. sh uses $((..)) instead (and bash understands it too).
Here comes fix.
--
Tom Pala <gotar at pld-linux.org>
-------------- next part --------------
diff -urN mc/vfs/extfs/audio.in mc.new/vfs/extfs/audio.in
--- mc/vfs/extfs/audio.in 2002-12-13 05:42:10.000000000 +0100
+++ mc.new/vfs/extfs/audio.in 2003-08-01 10:41:06.000000000 +0200
@@ -19,7 +19,7 @@
do
read A B C || break
A=`echo $A | sed 's/\.//'`
- SIZE=$[44+$B*2352]
+ SIZE=$((44+$B*2352))
if (( $A < 10 )); then A="0$A"; fi
echo "-r--r--r-- 1 0 0 $SIZE Jan 1 0:00 track-${A}.wav"
done
More information about the mc-devel
mailing list