Execute php script from bash , assign output to a bash variable

后端 未结 2 1644
一整个雨季
一整个雨季 2021-01-11 13:13

I have a bash script which need to execute some php scripts and to get back the results e.g

#!/bin/bash
/usr/bin/php -f $HOME/lib/get_fifobuild.php
         


        
2条回答
  •  醉话见心
    2021-01-11 13:59

    foobar=`/usr/bin/php -f $HOME/lib/get_fifobuild.php`
    

    note: these are backticks.

提交回复
热议问题