Skip to content

Instantly share code, notes, and snippets.

@mngyuan
Created February 16, 2022 02:18
Show Gist options
  • Save mngyuan/0d9602963fce59c787fec06d8086d0f9 to your computer and use it in GitHub Desktop.
Save mngyuan/0d9602963fce59c787fec06d8086d0f9 to your computer and use it in GitHub Desktop.
Open a random photo from my film photos
#!/bin/zsh
FILELIST=$( find *film -maxdepth 2 -mindepth 2 -type f -print )
RANDOMFILE=$( echo $FILELIST | sort --random-sort | head -n 1 )
echo $RANDOMFILE
open $RANDOMFILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment