Skip to content

Instantly share code, notes, and snippets.

@oplex
Last active April 2, 2020 18:16
Show Gist options
  • Save oplex/6342f833c8f97da5d6a12057208e3c95 to your computer and use it in GitHub Desktop.
Save oplex/6342f833c8f97da5d6a12057208e3c95 to your computer and use it in GitHub Desktop.
substitution_bash.md

Substitute commands

Document structure
{COMMAND}
{EXAMPLE #COMMENT}
{LINK(if any source)}

$()
myvar=($PWD) #command substitution, expands the current directory to variable

<()
\missing example\ #process substitution. Resort to if piping does not work. MORE:
https://superuser.com/questions/1059781/what-exactly-is-in-bash-and-in-zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment