Added increment symbol option to new sort logic, also made all scripts executable from the get go.

This commit is contained in:
Justin Emter
2017-12-22 14:29:49 -08:00
parent 8616a2aae6
commit d7464b72c3
7 changed files with 7 additions and 7 deletions

2
multi-channel-bash-scripts/channeldown.sh Normal file → Executable file
View File

@@ -38,7 +38,7 @@ CHANNEL_DIR_INCREMENT_SYMBOL="_"
FIRST_RUN=false
# Scan the dir to see how many channels there are, store them in an arr.
CHANNEL_DIR_ARR=( $(find . -maxdepth 1 -type d -name '*'"$CHANNEL_DIR_INCREMENT_SYMBOL"'[[:digit:]]*' -printf "%P\n" | sort -t_ -n) )
CHANNEL_DIR_ARR=( $(find . -maxdepth 1 -type d -name '*'"$CHANNEL_DIR_INCREMENT_SYMBOL"'[[:digit:]]*' -printf "%P\n" | sort -t"$CHANNEL_DIR_INCREMENT_SYMBOL" -n) )
# If the previous channel txt file doesn't exist already create it (first run?)
if [ ! -e "$OUTPUT_PREV_CHANNEL_PATH/$OUTPUT_PREV_CHANNEL_FILE" ]; then