Created
December 30, 2020 13:52
-
-
Save Schokokex/28a78a4542bc2ba97f8d9a5eb2f0c265 to your computer and use it in GitHub Desktop.
Print Primes in a linux shell
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
i=0; while :; do i=$(expr $i + 1); if [ "$i: $i" == "$(factor $i)" ]; then echo $i; fi;done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i=0; while :; do i=$(expr $i + 1); if [ "$i:$i" == "$ (factor $i)" ]; then printf "|"; else printf _; fi;done