function write_line_to_file() {
if [[ ! -n "$(cat "$2" | grep "$1")" ]]
then
echo "${1}" | tee -a "${2}" > /dev/null
fi
}
write_line_to_file 'line to write' "/path/to/file"
VAR="baz"
cat <<EOF | tee ${path_to_file}
foo
bar
${VAR}
EOF
input="/path/to/file"
while IFS= read -r line; do
echo "${line}"
done <"${input}"
netstat -tulpn
grep -v "^\s*${comment_char}"
sar -n TCP,ETCP 1