gabriel
asked Nov 26 2019
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.
linuxhelp
asked Nov 26 2019
edited Nov 26 2019
How can i insert a text in the last line of a file in linux
Hello,
need to edit the last line of file without entering into the file . how can enter the word using command