You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

12 lines
169 B

#!/bin/sh
n=1
for arg; do
if [ -z "$n" ]; then
n=$arg
else case $arg in
-n) n="";;
*) dir=$arg;;
esac
fi
done
fd -I -d 1 -t f -t l . "${dir:-}" | shuf -n "$n"