Linux Blog

tee time!

Filed under: Shell Script Sundays — TheLinuxBlog.com at 3:19 pm on Sunday, June 10, 2012

This weekend was South East Linux Fest, although I’m bummed I couldn’t make it I did learn something new from taking an LPIC level 1 self assessment. What I learned about was the application tee.

The question was something like:

“What command outputs to stdout and also writes to a file”

My answer was “echo” but that was the wrong answer. The correct answer was tee.

I’d seen it before in either Slackware or Debian’s packages list but forgot totally about it. It’s a pretty handy utility to have in your arsenal if you ask me. Usage would be something like this:

date | tee date.txt

this will echo the current date out, and also write it to date.txt. Of course, there are plenty of useful options which can be viewed in the man page which is linked below.

Enjoy! Happy Shell Scripting!

Want a Free Linux Journal Subscription?

Filed under: The Linux Blog News — TheLinuxBlog.com at 2:26 pm on Monday, March 9, 2009

Psst. Want a Free Linux Magazine Subscription? Not just any magazine, the original Linux magazine The Linux Journal. If you missed out on the fifteen issues for $15 then this may be a better deal for you. This is not one of those scams where you get a free magazine in exchange for a limb at the end of the year. Basically each day there is going to be a Sesame Street “Today’s episode brought to you by the letter…”. At the end of the week, you have to unscramble the letters and submit your answer. Every correct answer submitted *cue count voice* “One HA HA HA HA” second before Sat 14th March gets a free digital subscription to The Linux Journal! It couldn’t be easier. Although, I still think you missed out on the $15 for fifteen print issues. Oh well, follow me on twitter @LinuxBlog and next time you’ll know.