How to write a string to file and to stdout on console?
stdout
If I do
echo "hello" > logfile.txt
I view only hello in logfile.txt but how can I write hello also on console of Linux?
hello
logfile.txt
Use the tee command:
tee
echo "hello" | tee logfile.txt