Skip to content

Instantly share code, notes, and snippets.

@Schokokex
Created December 30, 2020 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Schokokex/28a78a4542bc2ba97f8d9a5eb2f0c265 to your computer and use it in GitHub Desktop.
Save Schokokex/28a78a4542bc2ba97f8d9a5eb2f0c265 to your computer and use it in GitHub Desktop.
Print Primes in a linux shell
i=0; while :; do i=$(expr $i + 1); if [ "$i: $i" == "$(factor $i)" ]; then echo $i; fi;done
@Schokokex
Copy link
Author

i=0; while :; do i=$(expr $i + 1); if [ "$i: $i" == "$(factor $i)" ]; then printf "|"; else printf _; fi;done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment