I use the following command to automatically update some include files in my PHP directory.
=========
perl -p -i.old -e 's#/phpdir/index.php#/php2dir/index.php#g' *
I run this from a Linux shell and I run it from within the directory that contains the files that I want to be updated.
Thus, if I
cd /home/username/www/php
I then run the command
perl -p -i.old -e 's#/phpdir/index.php#/php2dir/index.php#g' *
and it replaces any instance of "/phpdir/index.php" with "/php2dir/index.php" within any file in the current directory.
It works great. I want to run this command from cron once per day. I know how to use cron pretty well, I use it quite often. However, I am having trouble figuring out how to tell cron how to specify this particular command to be run from within the /home/username/www/php directory.
I looked at "perl --help" to see if the arguements could specify the directory, but none worked.
Can any one help me here...?
Thanks.