Autosave: 2022-12-14 19:00:05
This commit is contained in:
parent
76a3ac4af8
commit
5fd1b8cb32
1 changed files with 3 additions and 9 deletions
|
@ -3,15 +3,9 @@
|
||||||
DIRS_TO_PARSE="../Algorithms ../Computer_Architecture ../Databases"
|
DIRS_TO_PARSE="../Algorithms ../Computer_Architecture ../Databases"
|
||||||
|
|
||||||
for ele in $DIRS_TO_PARSE; do
|
for ele in $DIRS_TO_PARSE; do
|
||||||
MATCHES+=( $(find $ele -name "*.md" -type f) )
|
FILE_MATCHES+=( $(find $ele -name "*.md" -type f) )
|
||||||
done
|
done
|
||||||
|
|
||||||
for i in ${MATCHES[@]}
|
RANDOM_FILE_INDEX=$(( $RANDOM % ${#FILE_MATCHES[@]} + 0 ))
|
||||||
do
|
|
||||||
echo $i
|
|
||||||
done
|
|
||||||
|
|
||||||
# Next steps:
|
echo "Revise this topic: ${FILE_MATCHES[$RANDOM_FILE_INDEX]}"
|
||||||
# - Generate random number
|
|
||||||
# - Specify the range of the random number from 0 to length of $MATCHES
|
|
||||||
# - Return that index
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue