OS Manuals

ifne(1)

IFNE(1) moreutils IFNE(1)

.SH "NAME" ifne - Run command if the standard input is not empty

.SH "SYNOPSIS"

.HP 432u

ifne [-n] command

.SH "DESCRIPTION"

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

.SH "OPTIONS"

.PP -n

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.

.RE

.SH "EXAMPLE"

.HP 1752u

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

.SH "AUTHOR"

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

.PP Licensed under the GNU GPL

2008-05-01 moreutils

moreutils 0.70-r2 · enterprise-packages · ingested 2026-11-01