this is a utility that is typically used to read from standard input and write to standard output and files
root@oco:~$ IP=xxx.xxx.xxx.xxx
root@oco:~$ printf "%s\t%s\n\n" "$IP" "domain.tld subdomain.domain.tld" | sudo tee -a /etc/hosts
* the -a option ensures that the data is appended (not overwritten) to the file