Advertisement
Guest User

Untitled

a guest
Jul 19th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. mysqladmin --user=root --password=test_pass stop-slave
  2.  
  3. mysqladmin --user=root --password stop-slave
  4.  
  5. $ & ! [ ] < > `
  6.  
  7. mysql --password=pa$$word # does not work
  8. mysql --password='pa$$word' # works
  9. mysql --password=pa$$word # works, but slightly unclear what's going on at first glance
  10.  
  11. mysql --password="like'this" # password has a single quote in the middle
  12. mysql --password='like"this' # password with a double quote in the middle
  13.  
  14. $ echo foo$bar
  15. foo # literal 'foo' plus the (empty) shell variable $bar
  16.  
  17. $ echo foo$bar
  18. foo$bar # backslash prevents expansion of $bar as a variable
  19.  
  20. $ echo "foo$$bar" # weaker double quote doesn't prevent expansion so
  21. foo9691bar # the $$ expands to the unix process id (pid) of the current shell
  22.  
  23. $ echo 'foo$$bar'
  24. foo$$bar # "stronger" single quote prevents shell expansion
  25.  
  26. $ echo "foo'bar"
  27. foo'bar # double quote allows single quote within the literal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement