Last active
January 6, 2023 13:17
-
-
Save hellwolf/434bdb79db1b5cccb07f310d921852ba to your computer and use it in GitHub Desktop.
Recursive unix pipes, bash functional?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ f () { if [ $1 -gt 0 ];then less | f $(( $1 - 1 ));else less;fi; } | |
$ cat /dev/random | xxd | f 100 | |
$ ps aux| grep less | wc -l | |
102 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment