Skip to content

Instantly share code, notes, and snippets.

@ormaaj
Created January 17, 2015 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ormaaj/ad4ec937ef316f7aa5ff to your computer and use it in GitHub Desktop.
Save ormaaj/ad4ec937ef316f7aa5ff to your computer and use it in GitHub Desktop.
foo=666
{ eval "$(</dev/fd/4)"; } 3<<EOF1 4<<EOF2
var=$(printf %q "$foo")
EOF1
$(</dev/fd/3)
echo "$var"
EOF2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment