DOKK / manpages / debian 12 / moreutils / ifne.1.en
IFNE(1) moreutils IFNE(1)

ifne - Run command if the standard input is not empty

ifne [-n] command

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

-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.

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

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

Licensed under the GNU GPL

2008-05-01 moreutils