kondybas: (Default)
[personal profile] kondybas

Вот такой вот несложный скрипт:

#!/bin/sh

cat $1 \
| awk '{print int(rand()*100000) " " $1}' \
| sort -n \
| awk '{print $2}' > $1.rnd

Рассмотрим его поближе.



#!/bin/sh

cat $1 \
| awk '{print int(rand()*100000) " " $1}' \
| sort -n \
| awk '{print $2}' > $1.rnd

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting