Last active
April 22, 2018 10:29
-
-
Save mkoskinen/2f9b06a649113403ac27641bbadf417b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ENVIRON='-e P="foo bar" -e X="hum ho"' | |
ESC_ENVIRON='-e P='\"'foo bar'\"' -e X='\"'hum ho'\"'' | |
CMD="docker run -it --rm $ENVIRON ubuntu" | |
ESC_CMD="docker run -it --rm $ESC_ENVIRON ubuntu" | |
echo orig : $CMD | |
echo escapeddihipsut: $ESC_CMD | |
#$CMD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[markus@amaterasu ~]$ bash jussi.bash
orig : docker run -it --rm -e P="foo bar" -e X="hum ho" ubuntu
escapeddihipsut: docker run -it --rm -e P="foo bar" -e X="hum ho" ubuntu