'\" t
.\" Title: ifne
.\" Author: Javier Merino
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 2008-05-01
.\" Manual: moreutils
.\" Source: moreutils
.\" Language: English
.\"
.TH "IFNE" "1" "2008\-05\-01" "moreutils" "moreutils"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ifne \- Run command if the standard input is not empty
.SH "SYNOPSIS"
.HP \w'\fBifne\ [\-n]\ command\fR\ 'u
\fBifne [\-n] command\fR
.SH "DESCRIPTION"
.PP
\fBifne\fR
runs the following command if and only if the standard input is not empty\&.
.SH "OPTIONS"
.PP
\fB\-n\fR
.RS 4
Reverse operation\&. Run the command if the standard input is empty\&.
.sp
Note that if the standard input is not empty, it is passed through ifne in this case\&.
.RE
.SH "EXAMPLE"
.HP \w'\fBfind\ \&.\ \-name\ core\ |\ ifne\ mail\ \-s\ "Core\ files\ found"\ root\fR\ 'u
\fBfind \&. \-name core | ifne mail \-s "Core files found" root\fR
.SH "AUTHOR"
.PP
Copyright 2008 by Javier Merino
.PP
Licensed under the GNU GPL