I am running a PHP script in a larger shell script, doing
php -f $filename > `basename $filename .php`.html
Now I would like to tell the script which file extension to use for the output file name. I tried
export AW_FILENAME_SUFFIX=".html"
php -f $filename > `basename $filename .php`$AW_FILENAME_SUFFIX
and putenv("AW_FILENAME_SUFFIX=.txt")
in the script itself, but it seems that only environmental changes are made in the PHP command and its subprocesses, and not in the calling script.
Is there any other way to get data from my script besides the output that I can use for such metadata, or to write to a second file?
I ran several scripts that AFAIK means that I cannot actually source
delete them in mine, which can lead to duplication of functional errors.
source
share