ifne(1)

ifne1

Run command if the standard input is not empty

Usage

ifne [-n] command

Overview

ifne runs the following command if and only if the standard input is not empty.

Options

FC-nF[0]

Reverse operation. Run the command if the standard input is empty.

Note that if the standard input is not empty, it is passed through ifne in this case.

Examples

find . -name core | ifne mail -E 'set escape' -s "Core files found" root

Releases

10 releases since Debian 5.0 (Lenny); the text changed 5 times.

  1. 5.0–7
  2. 8
  3. 9–10
  4. 11
  5. 12–13
  6. Arch

-n until Debian 13 (Trixie).

Author

Copyright 2008 by Javier Merino <[email protected]>

Licensed under the GNU GPL

From moreutils 0.70-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.