mk90.commands

Command less

View text one eight-row page at a time.

Synopsis

less file
producer | less

Ordinary invocation: foreground child, PID 3; the shell waits. Also has a dedicated pipe-consumer form.

Parameters

ParameterMeaning
fileOne regular MKS2 file in the standalone form.
producerAn allowed pipe producer; the right-hand LESS takes no arguments.

Description

Uses constant-size buffers rather than loading the entire file. BK or space advances, lowercase b goes back in a file, and lowercase q or SU+C exits. The final page is marked (END).

Backward file navigation closes and reopens the reader, then scans from the beginning to the requested display page. It can therefore be slow on long files.

A pipe is not seekable: b is ignored there. Closing the pipe reader early wakes a blocked producer and terminates its output. At EOF, advancing in pipe mode exits; in file mode it remains at the end until a valid back or quit action.

Examples

less /mnt/smp1/demo.bas
cat /mnt/smp1/demo.bas | less
help | less

Limits and side effects

  • No search, line-number jump or arbitrary terminal control sequences. Letter controls are case-sensitive; switch to lowercase with R/L if necessary. File checksum verification is complete only when reading reaches EOF.

Status and diagnostics

Success is status 0. Relevant status codes: 1, 3, 4, 6, 8, 9, 14, 15, 18. See the diagnostic reference.

See also

cat · pipe · edit · Shell syntax