I’d like to do the reverse of xargs --no-run-if-empty
, so that it ONLY runs if the stdin is empty.
Example use:
ip a | fgrep "inet " | grep -ve " tun" -e " lo"
# pipe it into something and echo localhost if empty
I’d like to do the reverse of xargs --no-run-if-empty
, so that it ONLY runs if the stdin is empty.
Example use:
ip a | fgrep "inet " | grep -ve " tun" -e " lo"
# pipe it into something and echo localhost if empty