SyntaxFix
Write A Post
Hire A Developer
Questions
Other possible way is:
echo "text" | tee -a filename >/dev/null
The -a will append at the end of the file.
-a
If needing sudo, use:
sudo
echo "text" | sudo tee -a filename >/dev/null