[kwlug-disc] Sleep until command is finished

Mikalai Birukou mb at 3nsoft.com
Thu Jan 6 16:55:36 EST 2022


>     To accomplish your goal, I suspect you have to run smartctl to query
>     the test's progress e.g. something like this:
>         while true ; do
>             smartctl -a /dev/sda | grep -q 'Self-test routing in progress'
>             if [ $? -ne 0 ]; then
>                 echo test finished
>                 break
>             fi
>         done
>
>
> Or more concisely ...
>
> watch -n5 "smartctl -a /dev/sda | grep -q 'Self-test routing in 
> progress'"

sh woodoo indeed :)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20220106/f278f11a/attachment.htm>


More information about the kwlug-disc mailing list