-3

I wanna save the output of the following command to a variable:

#!/bin/bash
php -f myFile.php

How can I do?

Win
  • 1

1 Answers1

1

You can do something like so.

OUTPUT=`php -f myFile.php`
echo $OUTPUT
cmorrissey
  • 8,493
  • 2
  • 23
  • 27