title: how to print prime numbers using for loop in shell script
body: <p>I want to print prime numbers using for loop in shell script. Please provide some suggestions.</p>
  
  <p>actually I could able to print odd numbers from range of 1 to 100, but now I am unable to print prime numbers. Provide some script to print prime numbers</p>
  
  <pre><code># cat prime.sh
  #!/bin/bash
  for ((i=1; i&lt;=100; i++))
  
  do
  
        output=$(( $i % 2))
  
        if [ $output -ne 0 ]
  
        then
        echo "We got odd numbers: $i"
        fi
  done
  </code></pre>