Code:
cat MailingList | cut -d, -f1 | sort -u | wc -l
An example command is shown above. The output would be something like:
name1
name2
2
I'd like the output from the sort to go to the terminal as well as to the pipe.
I've used tee before, but I want all output to go to the terminal. I did some googling and scanned the bash doc at tldp which lend me down the path of trying a combination of parenthesis around the commands (subshell) and file descriptor redirecting. I haven't been successful. Any thoughts?
Thank you.