87 lines · 1.3 KB · Text
RawDownload
.TH CAT 1.SH NAMEcat, read \- catenate files.SH SYNOPSIS.B cat[.I file ...].br.B read[.B -m] [.B -n.I nline] [.I file ...].SH DESCRIPTION.I Catreads each.I filein sequence and writes it on the standard output.Thus.IP.Lcat file.LPprints a file and.IP.Lcat file1 file2 >file3.LPconcatenates the first two files and places the resulton the third..PPIf no.I fileis given,.I cat reads from the standard input.Output is buffered in blocks matching the input..PP.I Readcopies to standard output exactly one line from the named.IR file ,default standard input.It is useful in interactive.IR rc (1)scripts..PPThe.B -mflag causes it to continue reading and writing multiple lines until end of file;.B -ncauses it to read no more than.I nlinelines..PP.I Readalways executes a single.B writefor each line of input, which can be helpful whenpreparing 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..SH SOURCE.B /sys/src/cmd/cat.c.br.B /sys/src/cmd/read.c.SH SEE ALSO.IR cp (1).SH DIAGNOSTICS.I Readexits with status.B eofon end of file or, in the.B -ncase, if it doesn't read.I nlineslines..SH BUGSBeware of.L "cat a b >a"and.LR "cat a b >b" ,whichdestroy input files before reading them.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t