File: randomplay.sh

package info (click to toggle)
splay 0.8.2-1
  • links: PTS
  • area: contrib
  • in suites: hamm
  • size: 692 kB
  • ctags: 860
  • sloc: cpp: 7,690; sh: 277; makefile: 85; ansic: 29
file content (12 lines) | stat: -rwxr-xr-x 248 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

# for l in \ 

/bin/ls $1 | \
gawk 'BEGIN {srand(systime())} {print int(rand()*10000) " \"" $0 "\""}' \
| sort \
| awk '{a=sprintf("%s %s %s %s %s %s %s",$2,$3,$4,$5,$6,$7,$8)
        system(sprintf("./splay %s",a))}'

# do ls $l; done