---
name: "checkbash"
section: "1"
platform: "linux"
package: "debmake"
version: "3.8.3"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/checkbash"
---

# checkbash(1)

Check for bashisms in maintainer scripts

## NAME

checkbash - Check for bashisms in maintainer scripts

## SYNOPSIS

**checkbash** *script*

## DESCRIPTION

**checkbash** is a script used by **debstd** to check maintainer scripts for bashisms.\
 **debstd** runs **checkbash** on files (preinst, postinst, prerm and postrm) starting with #!/bin/sh.

When a bashism is detected, **checkbash** prints a message and quits.  Thus, only the first bashism is printed.

**checkbash** checks for the following bashisms:

- **'{.\*,.\*}'**

  If { and } are used

- **'\[\[:space:\]\]~'**

  If ~ Tilde Expansion is used

- **'&\>'**

  If special Redirection Symbol &\> is used

- **'select'**

  If the select Statement is used

## RETURN VALUE

If no bashisms were found, **checkbash** quits with 0. If bashisms were found, it quits with 1.

## SEE ALSO

[**debstd**(1)](/debstd/1.md)

## AUTHOR

Dennis Stampfer \<kontakt@dstampfer.de\> for the Debian Project
