Friday, January 22, 2016

Here document & Here string

$ cat << EOF
 \$ Working dir "$PWD" `pwd`
 EOF
$ Working dir "/home/user" /home/user

$ cat << 'EOF'
 \$ Working dir "$PWD" `pwd`
 EOF
\$ Working dir "$PWD" `pwd`

tr a-z A-Z <<< one

$ bc <<< 2^10
$ bc <<< '2^10 * (2+4)'


$ tr a-z A-Z <<< 'one
> two three'

$ echo 'one two three' | read a b c
$ echo $a $b $c
$ read a b c <<< 'one two three'
$ echo $a $b $c

No comments:

Blog Archive