MyNixOS website logo
Description

Reshape a data array from standard input.

rs reads the standard input, interpreting each line as a row of blank- separated entries in an array, transforms the array according to the op- tions, and writes it on the standard output. With no arguments (argc < 2) it transforms stream input into a columnar format convenient for terminal viewing, i.e. if the length (in bytes!) of the first line is smaller than the display width, -et is implied, -t otherwise.

The shape of the input array is deduced from the number of lines and the number of columns on the first line. If that shape is inconvenient, a more useful one might be obtained by skipping some of the input with the -k option. Other options control interpretation of the input columns.

The shape of the output array is influenced by the rows and cols specifi- cations, which should be positive integers. If only one of them is a po- sitive integer, rs computes a value for the other which will accommodate all of the data. When necessary, missing data are supplied in a manner specified by the options and surplus data are deleted. There are options to control presentation of the output columns, including transposition of the rows and columns.

Metadata

Version

20200313

Maintainers (1)

Platforms (44)

    Darwin
    FreeBSD 13
    Linux
    NetBSD
    OpenBSD
    Redox
    Solaris
    Windows
Show all
  • aarch64-darwin
  • aarch64-linux
  • aarch64-netbsd
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • i686-cygwin
  • i686-darwin
  • i686-freebsd13
  • i686-linux
  • i686-netbsd
  • i686-openbsd
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • microblaze-linux
  • microblazeel-linux
  • mips-linux
  • mips64-linux
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • powerpc-netbsd
  • powerpc64-linux
  • powerpc64le-linux
  • riscv32-linux
  • riscv32-netbsd
  • riscv64-linux
  • riscv64-netbsd
  • s390-linux
  • s390x-linux
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd13
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris