Linux command and eof on one line
I want to ask if it is possible to combine linux command and <
sendmail -S "lalalal" -f "dailaakak" -au "kakakak" <<EOF
>lalal:lalal
>opp:ttt
>ggg:zzz
EOF
I want to have something like this sendmail -S "lalalal" -f "dailaakak" -au "kakakak" <<EOF; lalal:lalal; opp:ttt; ggg:zzz; EOF
I need to use this not in a bash script
source to share
If you are asking if you can use << EOF
in an interactive shell then the answer is yes you can.
Note that this function is referred to here as document and that it EOF
can be any word instead . For example:
$ cat - << someword
> Here you
> can
> write text with as many
> newlines as you want.
> someword
Here you
can
write text with as many
newlines as you want.
( cat -
prints whatever it gets to stdin)
For more information on docs, you can read, for example, the following: http://tldp.org/LDP/abs/html/here-docs.html
source to share