Re: [patch] bashism in sh script
- From: Pavel Roskin <proski gnu org>
- To: GoTaR <gotar poczta onet pl>
- Cc: mc-devel gnome org
- Subject: Re: [patch] bashism in sh script
- Date: Fri, 08 Aug 2003 03:45:11 -0400 (EDT)
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?
--
Regards,
Pavel Roskin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]