1 Answer
Use the following command,cat <<EOT >> /root/sample.txt
Output:
cat <<EOT >> sample.txt
> test
> sample
> -bash: warning: here-document at line 12 delimited by end-of-file (wanted `EOT')
cat sample.txt
test
sample
test
Note:
Press Ctrl + d to terminate the end of the file.
Your Answer
x