There are probably a million better ways to do these, but these are tricks that I keep using (I'm well on my way to becoming an old crusty unix guy :-( )
About the Author...
Thomas is a meat popsicle. Thomas started working with UNIX while at SFU and UBC in Vancouver. Starting out on IRIX, HPUX and Solaris, he quickly transitioned to Linux in the early 90s. He has been a System Administrator and a Developer working mainly in Python and C. He's written several technology books, many dealing with Puppet and Configuration Management.