Answer the question
In order to leave comments, you need to log in
How to execute script on curl output?
People, help with solving the problem:
There is a certain script on a remote site: example.com/script.php
By executing it with the #curl example.com/script.php command, I get a certain array of data.
How to make it so that if this array contains a certain sequence of characters, for example "Privet Vasya!", a console command in bash is executed?
Answer the question
In order to leave comments, you need to log in
curl example.com/script.php | grep -q 'Hello Vasya!' && somecommand
This is in its simplest form.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question