---
name: "ifne"
section: "1"
platform: "linux"
package: "moreutils"
version: "0.70-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ifne"
---

# ifne(1)

Run command if the standard input is not empty

## NAME

ifne - Run command if the standard input is not empty

## SYNOPSIS

**ifne \[-n\] command**

## DESCRIPTION

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

## OPTIONS

- FC**-n**F\[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.

## EXAMPLE

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

## AUTHOR

Copyright 2008 by Javier Merino \<cibervicho@gmail.com\>

Licensed under the GNU GPL
