You are viewing a single comment's thread. Return to all comments →
read char; echo -e "YES\nNO\n" | grep -i $char
echo prints YES and NO in two different lines. (grep) -i means ignore case. grep returns whole line in which pattern is matched.
Seems like cookies are disabled on this browser, please enable them to open this website
Getting started with conditionals
You are viewing a single comment's thread. Return to all comments →
echo prints YES and NO in two different lines. (grep) -i means ignore case. grep returns whole line in which pattern is matched.