WLJS LogoWLJS Notebook

FilePrint

FilePrint["file"] prints out the raw textual contents of a file.

FilePrint["file", n] prints the first n lines.

FilePrint["file", -n] prints the last n lines.

Examples

Print entire file:

FilePrint["data.txt"]

Print first 5 lines:

FilePrint["log.txt", 5]

Print lines 10-20:

FilePrint["log.txt", 10 ;; 20]

Please visit the official Wolfram Language Reference for more details.

On this page