|
|
@@ -1,13 +1,23 @@
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
-languages="C++
|
|
|
-Python
|
|
|
-TypeScript
|
|
|
-C
|
|
|
-Go
|
|
|
-Ruby
|
|
|
-PHP
|
|
|
-Racket"
|
|
|
-
|
|
|
-echo "$languages" | shuf | head -n5
|
|
|
+#languages="C++
|
|
|
+#Python
|
|
|
+#TypeScript
|
|
|
+#C
|
|
|
+#Go
|
|
|
+#Ruby
|
|
|
+#PHP
|
|
|
+#Racket"
|
|
|
+#
|
|
|
+#echo "$languages" | shuf | head -n5
|
|
|
+
|
|
|
+lang_frek="$(find . -maxdepth 1 -mindepth 1 -not -path './.git' -type d \
|
|
|
+ | parallel -j1 'find {} -maxdepth 1 -mindepth 1 -type f | wc -l | xargs echo {}' \
|
|
|
+ | sort -k2)"
|
|
|
+
|
|
|
+lest_amount="$(echo "$lang_frek" | head -n1 | cut -d' ' -f2)"
|
|
|
+
|
|
|
+possibles="$(echo "$lang_frek" | grep "$lest_amount" | sed "s/ ${lest_amount}//g")"
|
|
|
+
|
|
|
+echo "$possibles" | shuf | head -n5
|