[patch] bashism in sh script
Andrew V. Samoilov
andrew at email.zp.ua
Fri Aug 8 08:02:44 UTC 2003
> On Fri, 1 Aug 2003, GoTaR wrote:
>
> > 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.
>
> Does the next line work for you? I mean this:
>
> if (( $A < 10 )); then A="0$A"; fi
>
> I think it's a much worse case of non-portable code. Have you tested your
> changes?
I think patch below make audio.in much more portable.
BTW, I don't see reason to substitute audio from audio.in.
--
Regards,
Andrew V. Samoilov.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: audio.in.patch
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20030808/7ffe4dd0/attachment.ksh>
More information about the mc-devel
mailing list