Following is the shell script that is expected to pick one line at a time from a given file highlight it.
#!/bin/sh
> myhighlight.txt
file='to_study.php'
cat $file | while read -r myline
do
export $myline
php -r 'highlight_string("$myline");' >> myhighlight.txt
done
PHP is failing to understand the $myline variable. Is there any way to make this code work?