Categories
Uncategorized

selecting a random file in the current folder

#!/bin/bash
files=(*)
echo "${files[RANDOM % ${#files[@]}]}"