Created
March 11, 2022 18:06
-
-
Save firedynasty/9b9e1c497eff48a307816855b4d93823 to your computer and use it in GitHub Desktop.
Updated change files in the folder with bash like reading a book
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
function 00(){ | |
if [[ $# -eq 0 ]]; then | |
current_folder_count=$(cat /Users/stanleytan/Desktop/macbook_pro_scripts/echo_files/other_test.txt) | |
current_folder_count=$(($current_folder_count + 0)) | |
#echo $current_folder_count | |
second_count=$(cat /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt) | |
second_count=$((second_count+1)) | |
echo -n $second_count > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
#echo $second_count | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -$second_count | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -$second_count | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -$second_count | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -$second_count | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -$second_count | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -$second_count | tail -1)" | |
fi | |
if ((second_count < current_folder_count)); | |
then | |
echo 'so far not exceeded' | |
else | |
echo 'exceeded' | |
fi | |
else | |
fi | |
} | |
function 01() { | |
echo -n 1 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -1 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -1 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -1 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -1 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -1 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -1 | tail -1)" | |
fi | |
} | |
function 02() { | |
echo -n 2 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -2 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -2 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -2 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -2 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -2 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -2 | tail -1)" | |
fi | |
} | |
function 03() { | |
echo -n 3 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -3 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -3 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -3 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -3 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -3 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -3 | tail -1)" | |
fi | |
} | |
function 04() { | |
echo -n 4 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -4 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -4 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -4 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -4 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -4 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -4 | tail -1)" | |
fi | |
} | |
function 05() { | |
echo -n 5 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -5 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -5 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -5 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -5 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -5 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -5 | tail -1)" | |
fi | |
} | |
function 06() { | |
echo -n 6 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -6 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -6 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -6 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -6 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -6 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -6 | tail -1)" | |
fi | |
} | |
function 07() { | |
echo -n 7 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -7 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -7 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -7 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -7 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -7 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -7 | tail -1)" | |
fi | |
} | |
function 08() { | |
echo -n 8 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -8 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -8 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -8 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -8 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -8 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -8 | tail -1)" | |
fi | |
} | |
function 09() { | |
echo -n 9 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -9 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -9 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -9 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -9 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -9 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -9| tail -1)" | |
fi | |
} | |
function 10() { | |
echo -n 10 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -10 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -10 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -10 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -10 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -10 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -10 | tail -1)" | |
fi | |
} | |
function 11() { | |
echo -n 11 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -11 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -11 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -11 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -11 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -11 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -11 | tail -1)" | |
fi | |
} | |
function 12() { | |
echo -n 12 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -12 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -12 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -12 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -12 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -12 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -12 | tail -1)" | |
fi | |
} | |
function 13() { | |
echo -n 13 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -13 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -13 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -13 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -13 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -13 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -13 | tail -1)" | |
fi | |
} | |
function 14() { | |
echo -n 14 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -14 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -14 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -14 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -14 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -14 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -14 | tail -1)" | |
fi | |
} | |
function 15() { | |
echo -n 15 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -15 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -15 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -15 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -15 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -15 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -15 | tail -1)" | |
fi | |
} | |
function 16() { | |
echo -n 16 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 not -path '*/\.*' | sort | head -16 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -16 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -16 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -16 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -16 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -16 | tail -1)" | |
fi | |
} | |
function 17() { | |
echo -n 17 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -17 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -17 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -17 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -17 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -17 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -17 | tail -1)" | |
fi | |
} | |
function 18() { | |
echo -n 18 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -18 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -18 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -18 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -18 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -18 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -18 | tail -1)" | |
fi | |
} | |
function 19() { | |
echo -n 19 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -19 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -19 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -19 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -19 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -19 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -19 | tail -1)" | |
fi | |
} | |
function 20() { | |
echo -n 20 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -20 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -19 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -20 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -20 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -20 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -20 | tail -1)" | |
fi | |
} | |
function 21() { | |
echo -n 21 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -21 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -21 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -21 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -21 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -21 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -21 | tail -1)" | |
fi | |
} | |
function 22() { | |
echo -n 22 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -22 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -22 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -22 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -22 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -22 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -22 | tail -1)" | |
fi | |
} | |
function 23() { | |
echo -n 23 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -23 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -23 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -23 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -23 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -23 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -23 | tail -1)" | |
fi | |
} | |
function 24() { | |
echo -n 24 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -24 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -24 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -24 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -24 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -24 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -24 | tail -1)" | |
fi | |
} | |
function 25() { | |
echo -n 25 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -25 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -25 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -25 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -25 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -25 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -25 | tail -1)" | |
fi | |
} | |
function 26() { | |
echo -n 26 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -26 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -26 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -26 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -26 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -26 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -26 | tail -1)" | |
fi | |
} | |
function 27() { | |
echo -n 27 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -27 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -27 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -27 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -27 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -27 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -27 | tail -1)" | |
fi | |
} | |
function 28() { | |
echo -n 28 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -28 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -28 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -28 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -28 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -28 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -28 | tail -1)" | |
fi | |
} | |
function 29() { | |
echo -n 29 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -29 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -29 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -29 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -29 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -29 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -29 | tail -1)" | |
fi | |
} | |
function 30() { | |
echo -n 30 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -30 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -30 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -30 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -30 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -30 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -30 | tail -1)" | |
fi | |
} | |
function 31() { | |
echo -n 31 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -31 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -31 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -31 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -31 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -31 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -31 | tail -1)" | |
fi | |
} | |
function 32() { | |
echo -n 32 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -32 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -31 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -32 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -32 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -32 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -32 | tail -1)" | |
fi | |
} | |
function 33() { | |
echo -n 33 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -33 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -33 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -33 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -33 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -33 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -33 | tail -1)" | |
fi | |
} | |
function 34() { | |
echo -n 34 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -34 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -34 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -34 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -34 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -34 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -34 | tail -1)" | |
fi | |
} | |
function 35() { | |
echo -n 35 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -35 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -35 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -35 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -35 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -35 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -35 | tail -1)" | |
fi | |
} | |
function 36() { | |
echo -n 36 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -36 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -35 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -36 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -36 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -36 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -36 | tail -1)" | |
fi | |
} | |
function 37() { | |
echo -n 37 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -37 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -37 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -37 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -37 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -37 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -37 | tail -1)" | |
fi | |
} | |
function 38() { | |
echo -n 38 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -38 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -38 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -38 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -38 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -38 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -38 | tail -1)" | |
fi | |
} | |
function 39() { | |
echo -n 39 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -39 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -39 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -39 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -39 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -39 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -39 | tail -1)" | |
fi | |
} | |
function 40() { | |
echo -n 40 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -40 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -40 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -40 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -40 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -40 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -40 | tail -1)" | |
fi | |
} | |
function 41() { | |
echo -n 41 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -41 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -40 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -41 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -41 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -41 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -41 | tail -1)" | |
fi | |
} | |
function 42() { | |
echo -n 42 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -42 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -40 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -42 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -42 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -42 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -42 | tail -1)" | |
fi | |
} | |
function 43() { | |
echo -n 43 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -43 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -43 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -43 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -43 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -43 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -43 | tail -1)" | |
fi | |
} | |
function 44() { | |
echo -n 44 > /Users/stanleytan/desktop/macbook_pro_scripts/echo_files/count_open.txt | |
# attach the number to the file | |
if [[ $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -44 | tail -1) == *".mp"* || $(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -44 | tail -1) == *".m4"* ]]; then | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -44 | tail -1)" | |
play "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -44 | tail -1)" | |
else | |
echo "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -44 | tail -1)" | |
pygmentize "$(find . -type f -maxdepth 1 -not -path '*/\.*' | sort | head -44 | tail -1)" | |
fi | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment