reverse

Functions

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

reverse [ option ] [ infile ]

  • -l int

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

  • -m int

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

  • infile str

    • double-type data sequence

  • stdout

    • double-type reversed data sequence

The input of this command is

\[ \begin{array}{ccc} \underbrace{x_0(0), \; \ldots, \; x_0(L-1)}_L, & \underbrace{x_1(0), \; \ldots, \; x_1(L-1)}_L, & \ldots, \end{array} \]
and the output is
\[ \begin{array}{ccc} \underbrace{x_0(L-1), \; \ldots, \; x_0(0)}_L, & \underbrace{x_1(L-1), \; \ldots, \; x_1(0)}_L, & \ldots, \end{array} \]
where \(L\) is the block length. If \(L\) is not given, \(L\) is assumed to be the length of entire sequence.

ramp -l 9 | reverse | x2x +da
# 8, 7, 6, 5, 4, 3, 2, 1, 0
ramp -l 9 | reverse -l 3 | x2x +da
# 2, 1, 0, 5, 4, 3, 8, 7, 6
Parameters:
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns:

0 on success, 1 on failure.