FilePrint

FilePrint["file"]

prints out the raw textual contents of file.

FilePrint["file",n]

prints out the first n raw textual lines of file.

FilePrint["file",-n]

prints out the last n raw textual lines of file.

FilePrint["file",m;;n]

prints out lines m through n of file.

FilePrint["file",m;;n;;s]

prints out lines m through n of file in steps of s.

Details

  • In FilePrint["file", m;;n;;s], s can be negative.
  • In a notebook, FilePrint generates a cell with style "Print".
  • With a textbased interface, FilePrint ends its output with a single newline (line feed).
  • FilePrint also works on cloud objects.
  • FilePrint[File["file"]] is also supported.

Examples

open allclose all

Basic Examples  (3)

Print the raw textual contents of a file:

Print out the first few lines of a file:

Print out the last few lines of a file:

Scope  (4)

Print every third line of a file:

Compare with:

Print out every other line of a file, from end to start:

Print a File object:

Print the raw textual contents of a cloud object:

Wolfram Research (2007), FilePrint, Wolfram Language function, https://reference.wolfram.com/language/ref/FilePrint.html (updated 2017).

Text

Wolfram Research (2007), FilePrint, Wolfram Language function, https://reference.wolfram.com/language/ref/FilePrint.html (updated 2017).

CMS

Wolfram Language. 2007. "FilePrint." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/FilePrint.html.

APA

Wolfram Language. (2007). FilePrint. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FilePrint.html

BibTeX

@misc{reference.wolfram_2021_fileprint, author="Wolfram Research", title="{FilePrint}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/FilePrint.html}", note=[Accessed: 07-December-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_fileprint, organization={Wolfram Research}, title={FilePrint}, year={2017}, url={https://reference.wolfram.com/language/ref/FilePrint.html}, note=[Accessed: 07-December-2021 ]}