I would like to search the string failed
in a text file and if found copy the entire line to another file.
Contends of test.txt:
: \Hardware\Disk Enclosure 27 diskslot1 failed : \Hardware\Disk Enclosure 27 diskslot2 normal : \Hardware\Disk Enclosure 27 diskslot3 normal : \Hardware\Disk Enclosure 27 diskslot4 normal
Please help on the script