Ubuntu – awk script that extracts prime numbers from a file
I'm trying to write an AWK script that would check if there are any prime numbers in a file and print them. Here is my code: #!/bin/awk -f function is_prime(n) { if (n <= 1) return 0; if (n ==…