in reply to random file script
An alternative can be using shuf:find . -name "*mp3" | sort -R | head -n 5
Using perl:find . -name "*mp3" | shuf | tail -n 5
Hint: You can wrap that line with a shell functionfind . -name "*mp3" | perl -MList::Util=shuffle -e 'print shuffle <>' + | head -n 4
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: random file script
by japh2963 (Novice) on Feb 05, 2015 at 03:34 UTC | |
by i5513 (Pilgrim) on Feb 05, 2015 at 08:31 UTC |