bcp

Functions

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

bcp [ option ] [ infile ]

  • -s int

    • start number (input) \((0 \le s \le e)\)

  • -e int

    • end number (input) \((s \le e < l)\)

  • -l int

    • block length (input) \((1 \le l)\)

  • -m int

    • block order (input) \((0 \le n)\)

  • -S int

    • start number (output) \((0 \le S < L)\)

  • -L int

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

  • -M int

    • block order (output) \((0 \le N)\)

  • -f double

    • pad value \((f)\)

  • +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)

      • a ascii

  • infile str

    • input data sequence

  • stdout

    • copied data sequence

This command copies data blocks in a frame-by-frame manner. The below figure shows the overview of the command.

../_images/bcp_1.png

The following example extracts multiples of three from a ramp sequence.

ramp -s 1 -l 9 | bcp +d -s 2 -l 3 | x2x +da
# 3, 6, 9
ramp -s 1 -l 9 | bcp +d -s 2 -l 3 -L 2 | x2x +da
# 3, 0, 6, 0, 9, 0
ramp -s 1 -l 9 | bcp +d -s 2 -l 3 -L 2 -S 1 | x2x +da
# 0, 3, 0, 6, 0, 9
Parameters:
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns:

0 on success, 1 on failure.

See also

bcut merge