1CHECKBASHISMS(1)            General Commands Manual           CHECKBASHISMS(1)
2
3
4

NAME

6       checkbashisms - check for bashisms in /bin/sh scripts
7

SYNOPSIS

9       checkbashisms script ...
10       checkbashisms --help|--version
11

DESCRIPTION

13       checkbashisms, based on one of the checks from the lintian system, per‐
14       forms basic checks on /bin/sh shell scripts for the  possible  presence
15       of  bashisms.   It  takes the names of the shell scripts on the command
16       line, and outputs warnings if possible bashisms are detected.
17
18       Note that the definition of a bashism in this context  roughly  equates
19       to  "a  shell  feature  that is not required to be supported by POSIX";
20       this means that some issues flagged may  be  permitted  under  optional
21       sections of POSIX, such as XSI or User Portability.
22
23       In  cases  where POSIX and Debian Policy disagree, checkbashisms by de‐
24       fault allows extensions permitted by Policy but may  also  provide  op‐
25       tions for stricter checking.
26

OPTIONS

28       --help, -h
29              Show a summary of options.
30
31       --newline, -n
32              Check for "echo -n" usage (non POSIX but required by Debian Pol‐
33              icy 10.4.)
34
35       --posix, -p
36              Check for issues which are non POSIX but  required  to  be  sup‐
37              ported by Debian Policy 10.4 (implies -n).
38
39       --force, -f
40              Force  each  script to be checked, even if it would normally not
41              be (for instance, it has a bash or non POSIX  shell  shebang  or
42              appears to be a shell wrapper).
43
44       --extra, -x
45              Highlight  lines which, whilst they do not contain bashisms, may
46              be useful in determining whether a particular issue is  a  false
47              positive  which  may  be  ignored.   For  example,  the  use  of
48              "$BASH_ENV" may be preceded by checking whether "$BASH" is set.
49
50       --early-fail, -e
51              Exit right after a first error is seen.
52
53       --version, -v
54              Show version and copyright information.
55

EXIT VALUES

57       The exit value will be 0 if no possible bashisms or other problems were
58       detected.  Otherwise it will be the sum of the following error values:
59
60       1      A possible bashism was detected.
61
62       2      A  file was skipped for some reason, for example, because it was
63              unreadable or not found.  The warning message will give details.
64
65       4      No bashisms were detected in a bash script.
66

SEE ALSO

68       lintian(1)
69

AUTHOR

71       checkbashisms was originally written as a shell script by  Yann  Dirson
72       <dirson@debian.org>  and  rewritten  in Perl with many more features by
73       Julian Gilbey <jdg@debian.org>.
74
75
76
77DEBIAN                         Debian Utilities               CHECKBASHISMS(1)
Impressum