Why not: 
```
cat /dev/urandom |  tr -c -d '[:alnum:]' | head -c 10
```

Or is ```/dev/urandom``` Linux only?