I want to update database from bash command:
#!/bin/bash
list= cat /home/wwwroot/list.txt;
mysql -u root -D dbname -e "UPDATE wp_postmeta SET meta_value = '$list' WHERE meta_key = 1";
cat /home/wwwroot/list.txt
text1
text2
text3
...
How to $list variable can be read in sql query?
Thank you.
list=$(cat /home/wwwroot/list.txt)