Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Tail ¶
Tail returns a Command that emits a trailing slice of its input.
Modes (first match wins):
- TailBytes(n) (-c n): emit the last n bytes of the reconstituted input.
- TailFromLine(n) (-n +n): emit every line from the 1-indexed line n onward.
- TailLines(n) (-n n): emit the last n lines. n <= 0 falls back to ten.
With no flag, Tail emits the last ten lines.
Types ¶
type TailBytes ¶
type TailBytes int
TailBytes outputs the last N bytes instead of lines (-c N). When set, the command reconstitutes the input stream and emits the last N bytes.
type TailFromLine ¶
type TailFromLine int
TailFromLine outputs every line from line N onward, 1-indexed (-n +N). TailFromLine(1) emits the whole input; TailFromLine(3) drops the first two lines. A value of zero or below leaves the from-line mode disabled.
Click to show internal directories.
Click to hide internal directories.