field parameters

Hi all...im trying to write a script to check for multipath failures, and im stumped. Heres a example of what im trying to do.

#!/bin/bash

multipath -v2 -l|while read true
do
get field1
get field 5 if it only equals to 'failed'
print 1+5 together
done

i have tried with cut already and no luck....not getting the correct fields...any help would be greatly appreciated. :slight_smile:

#!/bin/bash

multipath -v2 -l| while read field1 field2 field3 field4 field5 field6
do
       if test "$field5" == "failed"
       then
            echo $field1 $field5
       fi
done