G Garima New member Apr 21, 2017 #1 Hello guys, Is anyone here from Php background, I am here for some solution, can you please let me know, How to run a Bash script via PHP and match the output?
Hello guys, Is anyone here from Php background, I am here for some solution, can you please let me know, How to run a Bash script via PHP and match the output?
A alberto-morrison New member Apr 5, 2018 #3 You do it with exec ie: $exec = exec('/bin/sh /bin/scripts/myscript.sh ' , $output, $return); and you can see the output with: var_dump($output);
You do it with exec ie: $exec = exec('/bin/sh /bin/scripts/myscript.sh ' , $output, $return); and you can see the output with: var_dump($output);
E Elly New member Jun 5, 2018 #4 If all the lines contain a URL: awk -F"'|http://" '{print $5}' file.php If only some lines contain a URL: awk -F"'|http://" '/^define/ {print $5}' file.php Depending on the other lines you may need to change the ^define regex
If all the lines contain a URL: awk -F"'|http://" '{print $5}' file.php If only some lines contain a URL: awk -F"'|http://" '/^define/ {print $5}' file.php Depending on the other lines you may need to change the ^define regex
A aimbizcon New member Jun 19, 2018 #6 Please explain the deeply Because I can't understand what you say