grep -A 26 "some text" somefile.txt |
awk '/other text/ { gsub(/M/, " "); print $4 }' | while read line
do
//operations resulting in a true of false answer
done
The variables declared and used in the while only exist with the sub-shell created by piping to it, how do I keep track of them from outside? I need to use the returned true or false later in the script
Use process substitution: