Hey LQ,
I'm trying to perform a site-wide mysql upgrade on a webserver. I need to update all of the mysql functions to use mysqli. I have found this nifty command (
http://www.isaacsukin.com/news/2013/...iles-directory)
Code:
grep -lr -e "mysql" . | xargs sed -i "s/mysql/mysqli/g"
which works great. However when I try to complete the final part of the update with this command:
Code:
grep -lr -e "mysqli_query(" . | xargs sed -i "s/mysqli_query(/mysqli_query($link,/g"
It doesn't seem to like the word
$link. This is the result from it.
Code:
$result = mysqli_query(,$query);
And I figure this is because dollar signs means something to the console. Is there a way I can tell this command to ignore the dollar sign and search for it literally?
Any tips in the right direction would be soooo helpful! Thanks!