First

first

Return the first character, column, or line of input. Without a subcommand, returns the first line from stdin or a file.

Arguments

  • $1 (string): Optional: 'char', 'col'/'column', or 'row'/'line' to select what to return
  • $2 (string): Optional: file path (for col/row modes)

Exit codes

  • 0: Always

Output on stdout

  • First character, column, or line of the input

str_first

Alias for first().

last

Return the last character, column, or line of input. Without a subcommand, returns the last line from stdin or a file.

Arguments

  • $1 (string): Optional: 'char', 'col'/'column', or 'row'/'line' to select what to return
  • $2 (string): Optional: file path (for col/row modes)

Exit codes

  • 0: Always

Output on stdout

  • Last character, column, or line of the input

str_last

Alias for last().