Read text from a file or process handle

where

returns character data from the source as follows.

## File symbol

Returns the lines of the file as a list of strings. Lines are assumed delimited by either LF or CRLF, and the delimiters are removed.

q):test.txt 0:("hello";"goodbye")  / write some text to a file
"hello"
"goodbye"

q)/ read 500000 lines, chunks of (up to) 100000 at a time
q)d:raze{read0(:/tmp/data;x;100000)}each 100000*til 5

## File descriptor

Returns n chars from the file, starting from the position o.

q):foo 0: enlist "hello world"
q)read0 (:foo;6;5)
"world"

## System or process handle

Returns a line of text from the source.

q)rl
>> xiskso
"xiskso"

Reading the console permits interactive input.