It's kind of like 'type' in DOS. So if I typed cat ls-output.txt, this will list the contents of that text file to me. Usually cat's used to display small text files, but you can also use it to join a large file back together (sometimes larger files will be split this way). If I had three files named hak5.mpeg.001 hak5.mpeg.003 hak5.mpeg.009, I can rejoin them like this: cat hak5.mpeg.0* > hak5.mpeg. The wildcard asterisk will take all the hak5.mpeg.0* files and adjoin them from 1-9.
So standard inputs, right. Type cat and it does nothing because it's waiting for us to 'input' something into it. Now type 'trust your technolust' and hit CTRL-D, which tells cat the command is done. It'll retype trust your technolust as output. We can use this to make a text file like this: cat > trust.txt then hit enter and type trust your technolust. Hit CTRL-D again to end it. Now type cat trust.txt and it'll output your text file!
If you want to redirect standard input do this: cat < trust.txt. The less than sign redirects the source of input from the keyboard to the txt file. Not really useful until we get more in depth with redirecting inputs later on.
Next week, pipelines! Like in Mario! But first make sure to email me tips@hak5.org with your thoughts. And be sure to check out our sister show, Hak5 for more great stuff just like this. I'll be there, reminding you to trust your technolust.




When are you going to correct the links to the .mp4 files (HD and non-HD)? Trying to download via RSS or copying the urls results in 404s.
Neither http://videos.revision3.com/revision3/web/hak5/haktip/66/hak5–haktip–66–using-cat-with-standard-inputs–hd720p30.h264.mp4 nor http://videos.revision3.com/revision3/web/hak5/haktip/66/hak5–haktip–66–using-cat-with-standard-inputs–large.h264.mp4 have worked, since Sep 14.
Hi,

found it annoying too !
but then I took a look at the urls and found that “00″ was missing twice before the “66″…
it should habe been
http://videos.revision3.com/revision3/web/hak5/haktip/0066/hak5–haktip–0066–using-cat-with-standard-inputs–hd720p30.h264.mp4
and
http://videos.revision3.com/revision3/web/hak5/haktip/0066/hak5–haktip–0066–using-cat-with-standard-inputs–large.h264.mp4
Jili
works for 0067 to thanks mate really helped me out.
Could you please wear higher cut shirts. I had to rewind this episode over and over due to distractions. Thanks, Love the tips!
Eric from Ohio