Skip to content

Instantly share code, notes, and snippets.

@yuanqing
Last active August 29, 2015 14:14
Show Gist options
  • Save yuanqing/466f13ce57cdb7d84230 to your computer and use it in GitHub Desktop.
Save yuanqing/466f13ce57cdb7d84230 to your computer and use it in GitHub Desktop.
# SINGLE-QUOTED
# text between the single-quotes is read as a plain string
$ echo 'foo "bar" `baz`'
foo "bar" `baz`
# BACK-QUOTED
# text between the back-quotes is read as a command
$ echo `echo "foo"`
foo
# DOUBLE-QUOTED
# any nested back-quotes are to be read as commands
# all other text between the double-quotes is read as a plain string
$ echo "hello `echo "world"`"
hello world
cat * | grep foo
=>
Pipe(Call(Cat(), ["a.txt", "b.txt"]), Call(Grep(), ["foo"]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment