aboutsummaryrefslogtreecommitdiff
path: root/man/man1/cat.html
blob: 36d6923e0c77c15b8452a11ed7b323c65f8efeac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<head>
<title>cat(1) - Plan 9 from User Space</title>
<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
</head>
<body bgcolor=#ffffff>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr height=10><td>
<tr><td width=20><td>
<tr><td width=20><td><b>CAT(1)</b><td align=right><b>CAT(1)</b>
<tr><td width=20><td colspan=2>
    <br>
<p><font size=+1><b>NAME     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    cat, read, nobs &ndash; catenate files<br>
    
</table>
<p><font size=+1><b>SYNOPSIS     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <tt><font size=+1>cat</font></tt> [ <i>file ...</i> ]<br>
    <tt><font size=+1>read</font></tt> [ <tt><font size=+1>&#8722;m</font></tt> ] [ <tt><font size=+1>&#8722;n</font></tt> <i>nline</i> ] [ <i>file ...</i> ]<br>
    <tt><font size=+1>nobs</font></tt> [ <i>file ...</i> ]<br>
    
</table>
<p><font size=+1><b>DESCRIPTION     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <i>Cat</i> reads each <i>file</i> in sequence and writes it on the standard
    output. Thus<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <tt><font size=+1>cat file 
        <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
        </font></tt>
        
    </table>
    prints a file and<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <tt><font size=+1>cat file1 file2 &gt;file3 
        <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
        </font></tt>
        
    </table>
    concatenates the first two files and places the result on the
    third. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    If no <i>file</i> is given, <i>cat</i> reads from the standard input. Output
    is buffered in blocks matching the input. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    <i>Read</i> copies to standard output exactly one line from the named
    <i>file</i>, default standard input. It is useful in interactive <a href="../man1/rc.html"><i>rc</i>(1)</a>
    scripts. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    The <tt><font size=+1>&#8722;m</font></tt> flag causes it to continue reading and writing multiple
    lines until end of file; <tt><font size=+1>&#8722;n</font></tt> causes it to read no more than <i>nline</i>
    lines. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    <i>Read</i> always executes a single <tt><font size=+1>write</font></tt> for each line of input, which
    can be helpful when preparing input to programs that expect line-at-a-time
    data. It never reads any more data from the input than it prints
    to the output. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    <i>Nobs</i> copies the named files to standard output except that it
    removes all backspace characters and the characters that precede
    them. It is useful to use as <tt><font size=+1>$PAGER</font></tt> with the Unix version of <a href="../man1/man.html"><i>man</i>(1)</a>
    when run inside a <i>win</i> (see <a href="../man1/acme.html"><i>acme</i>(1)</a>) window.<br>
    
</table>
<p><font size=+1><b>SOURCE     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <tt><font size=+1>/usr/local/plan9/src/cmd/cat.c<br>
    /usr/local/plan9/src/cmd/read.c<br>
    /usr/local/plan9/bin/nobs<br>
    </font></tt>
</table>
<p><font size=+1><b>SEE ALSO    </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <a href="../man1/cp.html"><i>cp</i>(1)</a><br>
    
</table>
<p><font size=+1><b>DIAGNOSTICS     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <i>Read</i> exits with status <tt><font size=+1>eof</font></tt> on end of file or, in the <tt><font size=+1>&#8722;n</font></tt> case,
    if it doesn&#8217;t read <i>nlines</i> lines.<br>
    
</table>
<p><font size=+1><b>BUGS     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    Beware of <tt><font size=+1>cat a b &gt;a</font></tt> and <tt><font size=+1>cat a b &gt;b</font></tt>, which destroy input files before
    reading them.<br>
    
</table>

<td width=20>
<tr height=20><td>
</table>
<!-- TRAILER -->
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr height=15><td width=10><td><td width=10>
<tr><td><td>
<center>
<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
</center>
</table>
<!-- TRAILER -->
</body></html>