Hi,
the following script causes a checkbashism mis-detection:
-----BEGIN cutting here may damage your screen surface-----
#!/bin/sh
echo >&@ E: $2 returned error code $1
echo >&2 bla
-----END cutting here may damage your screen surface-----
tglase@tglase:~ $ checkbashisms x
possible bashism in x line 2 (should be >word 2>&1):
echo >&@ E: $2 returned error code $1
This was first reported in #772290 (thanks Raphael Geissert).
The >&@ is a genuine typo for >&2 and not a bashism¹. That being
said, it would be nice if checkbashisms could continue reporting
it, because of the following:
tglase@tglase:~ $ mksh x foo bar
x[2]: >&@ : illegal file descriptor name
bla
tglase@tglase:~ $ bash x foo bar
bla
tglase@tglase:~ $ dash x foo bar
x: 3: x: Syntax error: Bad fd number
dash aborts the script, instead of continuing, as the other shells
do, which is usually the wrong thing to do.
① … and especially not the dreaded &> bashism.
--- /etc/devscripts.conf ---
--- ~/.devscripts ---
DEBCHANGE_AUTO_NMU=no
DEBCHANGE_MAINTTRAILER=no
DEBCHANGE_MULTIMAINT_MERGE=yes
DEBCHANGE_RELEASE_HEURISTIC=log