Guest User

Untitled

a guest
Jul 23rd, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #!/bin/bash
  2. read col1 col2 col3 ... coln <<<
  3. $(mysql -u username -ppassword databasename -sse
  4. "select col1,col2,col3,...coln from table where ..." 2>/dev/null)
  5.  
  6. # do something with $col1, $col2...
  7.  
  8. mysql -u username -ppassword databasename -sse
  9. "update table set col1=..., col2=... where ..." 2>/dev/null
  10.  
  11. [mysql]
  12. user=user
  13. password=password
Add Comment
Please, Sign In to add comment