home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
DEMOS
/
UB_68000.LZH
/
cat.b
< prev
next >
Wrap
Text File
|
1996-05-06
|
510b
|
32 lines
* "quick and dirty" cat program
dim filenum:byte
dim filename:string[12]
dim buf:string[300]
on error goto badfile
lp
filename=NextArg
if len(filename)=0 then
end
endif
if filename="-?" or filename="--help" then
print
print "cat filename... filename"
print
print "concatenates files"
print
end
endif
open #filenum,filename:read
while not(eof(#filenum)) do
read #filenum,buf
fprint buf
endwhile
goto lp
badfile
print "error on file ";filename