title: How to print a lines till a valid email id comes in shell?
body: <pre><code>#!/bin/sh
  
  while read line 
  do
      echo "Name: " "$line"
      while []; do
          #statements
      done
  done &lt;input.txt
  </code></pre>