I am having some problems with loading a php file and then replacing his content with something else. my code looks like this
$pattern="*random text*"
$rep=" "
$where=`ls *.php`
find -f $where -name "*.php" -exec sed -i 's/$pattern/$rep/g' {} \;
This wont load entire line of text. Also is there a limit of how many character can $pattern load? Also is there a way to make this .sh file execute on every 15min for example?
i am using mac osX.
Thanks!