mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
18 lines
450 B
Plaintext
18 lines
450 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# ifne
|
|
|
|
> Run a command depending on the emptyness of `stdin`.
|
|
> More information: <https://manned.org/ifne>.
|
|
|
|
- Run the specified command if and only if `stdin` is not empty:
|
|
|
|
`ifne {{command}} {{command_options}}`
|
|
|
|
- Run the specified command if and only if `stdin` is empty, otherwise pass `stdin` to `stdout`:
|
|
|
|
`ifne -n {{command}} {{command_options}}`
|