---
name: "dh-exec-filter"
section: "1"
platform: "linux"
package: "dh-exec"
version: "0.30"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/dh-exec-filter"
---

# dh-exec-filter(1)

Debhelper executable file filtering scripts

## NAME

dh-exec-filter - Debhelper executable file filtering scripts

## SYNOPSIS

**#! /usr/bin/dh-exec**\
 \[hurd-i386 kfreebsd-any\] debian/non-linux/some-file /usr/lib/my-package\
 \<stage1\> src/compiler1 /usr/bin

## DESCRIPTION

Being a sub-command of [*dh-exec*(1)](/dh-exec/1.md), this program must not be ran directly, but through *dh-exec*, which automatically runs all available sub-commands if run bare; or explicitly with **dh-exec** **--with=subst**.

It is a wrapper around the various other filtering helpers, and will pipe the input file through all the available filtering helpers. It is up to these scripts to do the actual work.

## SCRIPTS

- **dh-exec-filter-arch**

  Filters out lines that are not for the current host architecture (the architecture the package is being built for). A line can be pre- or post-fixed with a bracketed list of architectures, and it will be kept only if building for one of the architectures.

  The filter supports negation and wildcards, with the same syntax as [*dpkg-architecture*(1)](/dpkg-architecture/1.md).

  Introduced in version *0.13*.

- **dh-exec-filter-build-profiles**

  Filters out lines that do not match the build profiles in effect. One can use the same syntax as in *debian/control* files. If any of the profiles match, the line will be kept, otherwise it gets filtered out.

  If a profile is specified, but **DEB\_BUILD\_PROFILES** is unset, an error will be thrown.

  Introduced in version *0.13*.

- **dh-exec-filter-comments**

  Removes commented and empty lines.

  Introduced in version *0.13*.

## ENVIRONMENT

*DH\_EXEC\_SCRIPTDIR*

Indicates which directory the command-specific scripts should be sought for. If not specified, scripts will be searched for in */usr/share/dh-exec/*.

## FILES

*$DH\_EXEC\_SCRIPTDIR/dh-exec-filter-\**

The various scripts for the higher-level program.

## VERSIONS

The sub-command was introduced in dh-exec version *0.13*.

## SEE ALSO

[**dh-exec**(1)](/dh-exec/1.md), [**debhelper**(7)](/debhelper/7.md)
