blob: 665fe4db17ad29dafd9416fa50a1fba262def470 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001SYNOPSIS
2 int cat(string path, int start, int num)
3
4DESCRIPTION
5 List the file found at path.
6
7 In most installations it is not legal to have '..' or spaces
8 in the path. This commands is normally connected to the "cat"
9 command that wizards have. It is also used by the "help"
10 command. The optional arguments start and num are start line
11 number and number of lines. If they are not given the whole
12 file is printed from the beginning.
13
14 The total number of lines will not exceed a system limit, which
15 normally is 50 lines.
16
17 cat() returns the number of lines read and printed if success,
18 0 if no such file or no lines to read (if start or len is < 0,
19 or if the file has less than start lines).
20
21EXAMPLE
22 cat("/doc/efun/cat", 5, 9);
23
24 This will print out the file "/doc/efun/cat" begining at line
25 5 and ending with line 13.
26
27SEE ALSO
28 get_dir(E), file_size(E), read_file(E), read_bytes(E),
29 valid_read(M)