linux-cli

Write to file from STDIN

ifconfig | tee network.txt

Append to a file from STDIN

echo "vm.swappiness = 40" | sudo tee -a /etc/sysctl.conf