Skip to main content
POSIXified the `paste` command.
Source Link
Stéphane Chazelas
  • 584.6k
  • 96
  • 1.1k
  • 1.7k

You can use paste -s to join lines:

shuf -i1-10 | paste -sd, -

This uses -i option of shuf to specify a range of positive integers.

The output of seq can be piped to shuf:

seq 10 | shuf | paste -sd, -

Or -e to shuffle arguments:

shuf -e {1..10} | paste -sd, -

You can use paste -s to join lines:

shuf -i1-10 | paste -sd,

This uses -i option of shuf to specify a range of positive integers.

The output of seq can be piped to shuf:

seq 10 | shuf | paste -sd,

Or -e to shuffle arguments:

shuf -e {1..10} | paste -sd,

You can use paste -s to join lines:

shuf -i1-10 | paste -sd, -

This uses -i option of shuf to specify a range of positive integers.

The output of seq can be piped to shuf:

seq 10 | shuf | paste -sd, -

Or -e to shuffle arguments:

shuf -e {1..10} | paste -sd, -
Source Link
rowboat
  • 3.1k
  • 7
  • 18

You can use paste -s to join lines:

shuf -i1-10 | paste -sd,

This uses -i option of shuf to specify a range of positive integers.

The output of seq can be piped to shuf:

seq 10 | shuf | paste -sd,

Or -e to shuffle arguments:

shuf -e {1..10} | paste -sd,