IFNE(1)
π IFNE(1) β the moreutils girlies know π
okay bestie, welcome to ifne from the moreutils collection β¨ she's tiny, she's iconic, she's literally one job and she does it flawlessly π
πΈ NAME πΈ
ifne β run command if the standard input is not empty π«Ά
like. that's it. that's the whole girl. no cap.
β¨ SYNOPSIS β¨
ifne [-n] command
π¦ DESCRIPTION π¦
so here's the vibe: ifne runs the following command if and only if the standard input is not empty π
that's the entire plot. no plot twists. main character energy, minimal dialogue, ate. π
π OPTIONS π
-nβ reverse operation, bestie π run the command if the standard input is empty instead.
β οΈ heads up though: if the standard input is not empty, it gets passed through ifne in this case. so like, it still flows on through. don't forget that part, it's giving sneaky π
π EXAMPLE π
the classic, the blueprint, the one that makes you go "ohhhh that's why":
find . -name core | ifne mail -E 'set escape' -s "Core files found" root
like yes, find your core files, and only bother mailing root about it if there's actually something there π no empty emails, no wasted drama, periodt.
π AUTHOR π
Copyright 2008 by Javier Merino <cibervicho@gmail.com> π
Licensed under the GNU GPL β
and that's the whole page, bestie π this was ifne(1) from moreutils, dated 2008-05-01 β yeah she's an elder but she's still serving π§β¨ mwah, go pipe something into her π
π¦ where this page comes from
- debian bookworm: moreutils 0.67-1 Β· GPL-2.0-or-later
- debian trixie: moreutils 0.69-1 Β· GPL-2.0-or-later
- epel 10: moreutils 0.68-3.el10_0 Β· GPL-2.0-only
- epel 9: moreutils 0.68-1.el9 Β· GPLv2
- fedora 43: moreutils 0.68-5.fc43 Β· GPL-2.0-only
- fedora 44: moreutils 0.68-6.fc44 Β· GPL-2.0-only
- nixos 26.05: moreutils 0.70
- nixpkgs unstable: moreutils 0.70
- opensuse-leap 16.0: moreutils 0.68-bp160.1.13 Β· GPL-2.0-only AND GPL-2.0-or-later AND (GPL-2.0-or-later OR MIT) AND BSD-2-Clause AND SUSE-Public-Domain
- opensuse-leap 16.0: moreutils 0.68-bp160.1.13 Β· GPL-2.0-only AND GPL-2.0-or-later AND (GPL-2.0-or-later OR MIT) AND BSD-2-Clause AND SUSE-Public-Domain
- opensuse-leap 16.0: moreutils 0.68-bp160.1.13 Β· GPL-2.0-only AND GPL-2.0-or-later AND (GPL-2.0-or-later OR MIT) AND BSD-2-Clause AND SUSE-Public-Domain
- opensuse-leap 16.0: moreutils 0.68-bp160.1.13 Β· GPL-2.0-only AND GPL-2.0-or-later AND (GPL-2.0-or-later OR MIT) AND BSD-2-Clause AND SUSE-Public-Domain
- ubuntu noble: moreutils 0.69-1 Β· GPL-2.0-or-later
- ubuntu questing: moreutils 0.69-1
- ubuntu resolute: moreutils 0.69-1build1 Β· GPL-2.0-or-later
- ubuntu stonking: moreutils 0.70-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms