Cat

From Hackepedia
Revision as of 04:29, 6 June 2007 by Pbug (talk | contribs) (some examples for cat.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Cat is a command to concatenate or just print files.. here is an example

cat SHH.yt | head

which would pipe the file SHH.yt to the program head.

An example improved cat would the following shell syntax:

#!/bin/sh

while : ; do
 read i
 echo $i
done

The above serves as a rudamentary cat, when it's missing in a s(h)y[st]em.