langs a-z

This commit is contained in:
Ingy döt Net 2013-04-10 22:43:41 -07:00
parent db842d013d
commit d066446780
11389 changed files with 98361 additions and 1020 deletions

View file

@ -0,0 +1,8 @@
#!/bin/sh
cat << ANARBITRARYTOKEN
The river was deep but I swam it, Janet.
The future is ours so let's plan it, Janet.
So please don't tell me to can it, Janet.
I've one thing to say and that's ...
Dammit. Janet, I love you.
ANARBITRARYTOKEN

View file

@ -0,0 +1,6 @@
cat << EOF
Here documents do parameter and command substitution:
* Your HOME is $HOME
* 2 + 2 is `expr 2 + 2`
* Backslash quotes a literal \$, \` or \\
EOF

View file

@ -0,0 +1,5 @@
if true; then
cat <<- EOF
The <<- variant deletes any tabs from start of each line.
EOF
fi

View file

@ -0,0 +1,6 @@
cat << 'TOKEN'
If TOKEN has any quoted characters (like 'TOKEN', "TOKEN" or \TOKEN),
then all $ ` \ in the here document are literal characters.
$PATH \$PATH `shutdown now`
TOKEN

View file

@ -0,0 +1,9 @@
#!/bin/csh -f
cat << ANARBITRARYTOKEN
* Your HOME is $HOME
* 2 + 2 is `@ n = 2 + 2; echo \$n`
ANARBITRARYTOKEN
cat << 'ANARBITRARYTOKEN'
$PATH \$PATH `shutdown now`
'ANARBITRARYTOKEN'