I was in the process of creating a User
class where one of the methods was get_privileges();
.
After hours of slamming my head into the keyb
for Mac OS:
find . -type f -name '*.sql' -exec sed -i '' s/privelages/privileges/ {} +
Matwilso's script from above would then look like this if it were designed to work on Mac OS
#!/bin/bash
# This will replace all instances of a string in folder names, filenames,
# and within files. Sometimes you have to run it twice, if directory names change.
# Example usage:
# replace_string apple banana
echo ${1}
echo ${2}
find . -type f -name '*.sql' -exec sed -i '' s/${1}/${2}/ {} + # inside sql scripts