cat >tempfile.txt <
> def
> acb
> DELIM
tzhang@colinux:~/temp$ cat abc
abc
def
acb
tzhang@colinux:~/temp$
By default variables and also commands in backticks are evaluated:
$ cat <<> Working dir $PWD
> EOF
Working dir /home/user
This can be disabled by setting the label in the command line in single or double quotes:
$ cat << "EOF"
> Working dir $PWD
> EOF
Working dir $PWD
Appending a minus sign to the <<>
echo with quote:
echo "abc
def
acb" >tempfile.txt
----------------------------
No comments:
Post a Comment