selecting a random file in the current folder

<br />
#!/bin/bash<br />
files=(*)<br />
echo &quot;${files[RANDOM % ${#files[@]}]}&quot;<br />

Comments are closed.