Created
February 16, 2022 02:18
-
-
Save mngyuan/0d9602963fce59c787fec06d8086d0f9 to your computer and use it in GitHub Desktop.
Open a random photo from my film photos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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