Answer the question
In order to leave comments, you need to log in
How to execute a command using bash if a piece of text is successfully found in the def. file and vice versa?
Here, for example, I enter in the console:
If it finds everything with the word meta, it will execute echo with the word successfully, if it does not find it, it will not execute. But how to make that in case of an unsuccessful search, force another command to be executed? For example echo "unsuccessful"? And how to organize all this in one request? grep meta /home/1.html && echo успешно
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question