This is the opposite of this question.
I am migrating from a lowercase_names
db server to a case sensitive setup in which I require UPPER CASE names for tables and column (they are stored uppercase in code).
I have read in this answer that using sed is a good way to replace names to lower case, which is not what I want.
So starting from the regex
s/`\(\w\+\)`/\L&/g
I changed it to
s/`\(\w\+\)`/\U&/g
Thinking that it would convert to upper case. Then I tried to run this one-liner after having imported the uppercase DDL
mysqldump --skip-triggers --compact --no-create-info -hxx -uxx -pxx source | sed s/`\(\w\+\)`/\U&/g | mysql -hxx -uxx -pxx target
But that failed
-bash: /g: No such file or directory
-bash: (w+): command not found
sed: -e expression #1, char 4: unterminated `s' command
How can I run this uppercase-converter in Bash?