diff --git a/bash/file_to_link.sh b/bash/file_to_link.sh index e817df1..2acfc24 100755 --- a/bash/file_to_link.sh +++ b/bash/file_to_link.sh @@ -2,7 +2,7 @@ ## usage USAGE="USAGE: -$(basename "$0") source_file dest_dir +$(basename "$0") source_file dest_dir" readonly USAGE function help_message() { diff --git a/bash/file_to_zip.sh b/bash/file_to_zip.sh index a3e80f3..fafaec5 100755 --- a/bash/file_to_zip.sh +++ b/bash/file_to_zip.sh @@ -37,8 +37,8 @@ if ! test -d "${TARGET}"; then fi ## create zip file -NAME=$(basename "${SOURCE}") +#NAME=$(basename "${SOURCE}") filename=$(basename -- "$SOURCE") -extension="${filename##*.}" +#extension="${filename##*.}" filename="${filename%.*}" 7z a -tzip -mx=9 "${TARGET}"/"${filename}".zip "${SOURCE}" diff --git a/bash/files_to_letters.sh b/bash/files_to_letters.sh index ca79c52..767d2bb 100755 --- a/bash/files_to_letters.sh +++ b/bash/files_to_letters.sh @@ -1,5 +1,8 @@ #!/bin/bash +## Mueve todos los elementos de la carpeta donde se ejecuta a subcarpetas +## basado en la primera letra de cada elemento + shopt -s nocasematch shopt -s nocaseglob diff --git a/bash/move_chd.sh b/bash/move_chd.sh deleted file mode 100755 index d3e7eae..0000000 --- a/bash/move_chd.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -#sony.europe -find ~/downloads/psx/europe -type f -iname "*.chd" -mtime +0 -exec mv -v {} ~/chd/Sony\ -\ PlayStation\ \(2020-10-05\)\ \(Redump\)\ \(CHD\)/europe/ \; - -#sony.usa -find ~/downloads/psx/usa -type f -iname "*.chd" -mtime +0 -exec mv -v {} ~/chd/Sony\ -\ PlayStation\ \(2020-10-05\)\ \(Redump\)\ \(CHD\)/usa/ \; - -#sony.japan -find ~/downloads/psx/japan -type f -iname "*.chd" -mtime +0 -exec mv -v {} ~/chd/Sony\ -\ PlayStation\ \(2020-10-05\)\ \(Redump\)\ \(CHD\)/japan/ \; - -#sony.psp -find ~/downloads/psp -type f -iname "*.zip" -mtime +0 -exec mv -v {} ~/chd/Sony\ -\ PlayStation\ Portable\ \(2022-03-21\)\ \(Redump\)/ \; diff --git a/bash/cron_skyskraper.sh b/bash/skyscraper_cron.sh similarity index 91% rename from bash/cron_skyskraper.sh rename to bash/skyscraper_cron.sh index d501e17..0d7c6ce 100755 --- a/bash/cron_skyskraper.sh +++ b/bash/skyscraper_cron.sh @@ -3,7 +3,8 @@ readonly APP=/home/sergio/code/bashscript/skyscraper_system.sh readonly LOG=/home/sergio/cronjobs/cronjobs.log readonly SYSTEMS_COMPUTERS="amstradcpc amiga atarist c64" readonly SYSTEMS_OTHER="dreamcast gc nds pcengine psp psx saturn segacd" -readonly TODAY=$(date +"%d-%m-%Y") +TODAY=$(date +"%d-%m-%Y") +readonly TODAY printf "\n%s (%s, %s)\n" "$(basename "${0}")" "${TODAY}" "$(date +%A)" >>"${LOG}" @@ -16,7 +17,7 @@ for SYSTEM in $SYSTEMS_COMPUTERS; do ${APP} scrap /home/sergio/roms/computer "${SYSTEM}" END=$(date -u +"%s") - ELAPSED=$(($END - $START)) + ELAPSED=$((END - START)) E=$(date -ud @$ELAPSED +'%H:%M:%S') printf " (%s)\n" "${E}" >>"${LOG}" @@ -31,7 +32,7 @@ for SYSTEM in $SYSTEMS_OTHER; do ${APP} scrap /home/sergio/roms/skyscraper "${SYSTEM}" END=$(date -u +"%s") - ELAPSED=$(($END - $START)) + ELAPSED=$((END - START)) E=$(date -ud @$ELAPSED +'%H:%M:%S') printf " (%s)\n" "${E}" >>"${LOG}" diff --git a/bash/telegram_bot_arg.sh b/bash/telegram_bot_arg.sh deleted file mode 100755 index a4d14a5..0000000 --- a/bash/telegram_bot_arg.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -TOKEN="5383183749:AAHV8pc9yN_h_LNfixOJXAvVYCNcby0HlCY" -ID="717637871" -MENSAJE=$1 -URL="https://api.telegram.org/bot$TOKEN/sendMessage" - -curl -s -X POST $URL -d chat_id=$ID -d text="$MENSAJE" > /dev/null diff --git a/bash/telegram_bot_pipe.sh b/bash/telegram_bot_pipe.sh deleted file mode 100755 index 0e27674..0000000 --- a/bash/telegram_bot_pipe.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -TOKEN="5383183749:AAHV8pc9yN_h_LNfixOJXAvVYCNcby0HlCY" -ID="717637871" -MENSAJE=$( /dev/null