Guest User

Untitled

a guest
Jul 25th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. Parameter list with double quotes does not pass through properly in Bash
  2. echo $SVN $command $@ > /tmp/shimcmd
  3. bash /tmp/shimcmd
  4. $SVN $command $@
  5.  
  6. svn commit --username=myuser --password=mypass --non-interactive --trust-server-cert -m "Auto Update autocommit Wed Apr 11 17:33:37 CDT 2012"
  7.  
  8. $SVN $command $@
  9.  
  10. eval "$SVN $command $@"
  11.  
  12. $ args='-m "foo bar"'
  13. $ printf '<%s> ' $args
  14. <-m> <"foo> <bar">
  15.  
  16. $ args=( -m "foo bar" )
  17. $ printf '<%s> ' "${args[@]}"
  18. <-m> <foo bar>
  19.  
  20. echo -n -e $SVN "$command" > /tmp/shimcmd
  21. for x in "$@"
  22. do
  23. a=$a" ""$x"
  24. done
  25. echo -e " " $a >> /tmp/shimcmd
  26. bash /tmp/shimcmd
  27.  
  28. $SVN "$command" "$@"
Add Comment
Please, Sign In to add comment