Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [shuf]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
1answer
48 views

What does shuf -e means in bash

I have string save as test="test1 test2 test3 test4 test5 test6" and echo $(shuf -e $test) it gives me the same output as $test, why? I expect the different order of the original string
1
vote
1answer
131 views

Does the size of the random_source file matter?

Some GNU coreutils utilities like sort and shuf use a file as what effectively serves a seed. Does the size of the file matter? The recommended way, https://www.gnu.org/software/coreutils/manual/...
0
votes
0answers
82 views

Is this segment fault raised when running `shuf`?

I have a script, where there is a line: eval for i in \{"$1".."$2"\}\; do [ ! -e "$3"/\$i.\* ] \&\& echo \"\$i\" \; done \| shuf \| mycommand "$3" which means: first create a sequence of ...
3
votes
1answer
421 views

Moving random files using shuf and mv - Argument list too long

I have a directory containing nearly 250K files, which are lots of files, and I want to move x random files to another directory. I searched and I got the solution of using the shuf and mv commands ...
0
votes
1answer
87 views

How to select random sample of n lines from each file in a directory

I have a directory with many files. From each of these files I want a random sample and copy to a new directory with file names same as from which random sample was drawn.
2
votes
2answers
199 views

Randomly select a line in every block of N lines [duplicate]

I'd like to randomly select a line after a given number of lines. For example here's my input: 8 blue 8 red 8 yellow 8 orange 3 pink 3 white 3 cyan 3 purple 1 magenta 1 black 1 green 1 brown and ...