Hi,
But since you are greping for a Known Quantity aren't you just really looking for the STATUS of grep whether it found your pattern or not? Why do you need the line stored in a variable?
grep '100% loss' backup.tmp
if [ $? == 0 ]; then
echo "ALL was lost"
fi
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.