Autosave: 2022-12-14 19:00:05

This commit is contained in:
thomasabishop 2022-12-14 19:00:05 +00:00
parent 76a3ac4af8
commit 5fd1b8cb32

View file

@ -3,15 +3,9 @@
DIRS_TO_PARSE="../Algorithms ../Computer_Architecture ../Databases"
for ele in $DIRS_TO_PARSE; do
MATCHES+=( $(find $ele -name "*.md" -type f) )
FILE_MATCHES+=( $(find $ele -name "*.md" -type f) )
done
for i in ${MATCHES[@]}
do
echo $i
done
RANDOM_FILE_INDEX=$(( $RANDOM % ${#FILE_MATCHES[@]} + 0 ))
# Next steps:
# - Generate random number
# - Specify the range of the random number from 0 to length of $MATCHES
# - Return that index
echo "Revise this topic: ${FILE_MATCHES[$RANDOM_FILE_INDEX]}"