<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <br>
    <blockquote type="cite"
cite="mid:CA+TuoW2Kw6hg5JPcJVJXsVha9-0J2umx=Y7i-KZYtMXJzro=+Q@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_quote">
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">To accomplish your goal,
            I suspect you have to run smartctl to query<br>
            the test's progress e.g. something like this:<br>
                while true ; do<br>
                    smartctl -a /dev/sda | grep -q 'Self-test routing in
            progress'<br>
                    if [ $? -ne 0 ]; then<br>
                        echo test finished<br>
                        break<br>
                    fi<br>
                done</blockquote>
          <div><br>
          </div>
          <div>Or more concisely ... <br>
          </div>
          <div><br>
          </div>
          <div>watch -n5 "smartctl -a /dev/sda | grep -q 'Self-test
            routing in progress'" <br>
          </div>
        </div>
      </div>
    </blockquote>
    <p>sh woodoo indeed :)<br>
    </p>
    <p><br>
    </p>
  </body>
</html>