IFNE(1)

πŸ“¦
version 0.70 Β· 4 versions
, in debian bookworm, debian trixie, epel 10, epel 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… 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