I am facing the following error
bash: !": event not found
while i have write the following command
echo "HI" test.txt
in terminal,
whats the problem?
I am facing the following error
bash: !": event not found
while i have write the following command
echo "HI" test.txt
in terminal,
whats the problem?
You are probably typing it as:
echo "HI!" >> test.txt
! is a special character in bash (Linux) and needs to be escaped like so:
echo "HI\!" >> test.txt
I think this question is answered very well in this link: https://serverfault.com/questions/208265/what-is-bash-event-not-found?newreg=2077048244ee45dbb6f7d1925d71458f
Hope this helps.
You have a syntax error in your command, You need to add the '>>' between your text and your name file and also try removing the quotes:
echo HI >> test.txt