On Wed, Jul 24, 2019 at 10:50 AM Petr Štetiar wrote:
>
> Rosen Penev [2019-07-24 10:32:31]:
>
> > SC2004: $/${} is unnecessary on arithmetic variables.
> > SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
>
> Can you please provide some details, why should we care about this shell
Hi,
I suppose this has no been runtime tested since `$(${PIDCOUNT} + 1)`
will attempt to execute `${PIDCOUNT}` as command in a subshell with '+'
and '1' passed as arguments to it:
root@OpenWrt:~# PIDCOUNT=1; PIDCOUNT="$(${PIDCOUNT} + 1)"; echo
"$PIDCOUNT"
-ash: 1: not found
I think the prope
Rosen Penev [2019-07-24 10:32:31]:
> SC2004: $/${} is unnecessary on arithmetic variables.
> SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Can you please provide some details, why should we care about this shellcheck
warnings ?
> - PIDCOUNT="$(( ${PIDCOUNT} + 1))"
> +
Warnings fixed:
SC2004: $/${} is unnecessary on arithmetic variables.
SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Signed-off-by: Rosen Penev
---
package/system/ubox/Makefile | 2 +-
package/system/ubox/files/log.init | 6 +++---
2 files changed, 4 insertions(+), 4 del