| <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 – 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>−m</font></tt> ] [ <tt><font size=+1>−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 >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>−m</font></tt> flag causes it to continue reading and writing multiple |
| lines until end of file; <tt><font size=+1>−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>−n</font></tt> case, |
| if it doesn’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 >a</font></tt> and <tt><font size=+1>cat a b >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> |