bcut

Functions

int main(int argc, char *argv[])

bcut [ option ] [ infile ]

  • -s int

    • start number \((0 \le S)\)

  • -e int

    • end number \((S \le E)\)

  • -l int

    • block length \((1 \le L)\)

  • -m int

    • block order \((0 \le L-1)\)

  • +type char

    • data type

      • c char (1byte)

      • C unsigned char (1byte)

      • s short (2byte)

      • S unsigned short (2byte)

      • h int (3byte)

      • H unsigned int (3byte)

      • i int (4byte)

      • I unsigned int (4byte)

      • l long (8byte)

      • L unsigned long (8byte)

      • f float (4byte)

      • d double (8byte)

      • e long double (16byte)

  • infile str

    • data sequence

  • stdout

    • cut data sequence

The input of this command is

\[ \begin{array}{ccc} \underbrace{x(0), \; \ldots, \; x(L - 1)}_{x_0}, & \underbrace{x(L), \; \ldots, \; x(2L - 1)}_{x_1}, & \ldots, \end{array} \]
and the output is
\[ \begin{array}{cccc} x_S, & x_{S+1}, & \ldots, & x_E, \end{array} \]
where \(L\) is the block length.

ramp -l 7 | bcut +d -s 3 -e 5 | x2x +da
# 3, 4, 5
ramp -l 7 | bcut +d -l 2 -s 1 -e 1 | x2x +da
# 2, 3

See also

bcp merge