bash echo does not work after grep returns nothing

I understand that people generally use grep in Linux command prompt (not in a script). I happen to put grep in a script and run into a strange case. If the grep command returns nothing, the next line echo does not work. Below is the script.

grep "abc" /home/testuser/myapp.log
echo "abc"

Is this the normal behavior of grep? If yes, why?



from Recent Questions - Stack Overflow https://ift.tt/3qrtHwf
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

I get wrong characters when retreiving the message body of an email using TIdIMAP4.UIDRetrieveTextPeek2()

How to drop the all the 1's in a correlation matrix

Today Walkin 14th-Sept