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.

randfile 169B

123456789101112
  1. #!/bin/sh
  2. n=1
  3. for arg; do
  4. if [ -z "$n" ]; then
  5. n=$arg
  6. else case $arg in
  7. -n) n="";;
  8. *) dir=$arg;;
  9. esac
  10. fi
  11. done
  12. fd -I -d 1 -t f -t l . "${dir:-}" | shuf -n "$n"