Sunday, November 09, 2008

Knowledge

Don’t start your next text message with ‘rm -rf /’
Imagine a single-app computer that reboots and tees every character you type both to the foreground application and to the shell … as root.

JWZ links to the goods:

Yeah, uh, ‘oops.’


Well, that's a big fum-ducker all-righty.  But what is this 'Tee'?

tee - read from standard input and write to standard output and files

So I could do this?

ls -la | tee file.txt | more

I must lack curiosity or something - if I'd ever heard of this I have no recollection of it.  Seems blazingly obvious in hindsight - if you can pipline you surely can stick in a T join.

 And I can think of some shell scripts I use that really need to be refactored.

Learning Stuff is the awesome.
blog comments powered by Disqus