<commit_before>#!/bin/bash
#
# move log files to archive folder
#
# run by cron the 1st of every month
#
# <EMAIL> 11.02.2017
#

cd './Dropbox' 2> '/dev/null'


YESTERDAY_YEAR=$(date --date='15 days ago' +%Y)
YESTERDAY_MONTH=$(date --date='15 days ago' +%m)


move_to_archive () {
  local LOG_FOLDER="${1}"

  mkdir -p "${LOG_FOLDER}"

  cd "${LOG_FOLDER}"

  mkdir -p "${YESTERDAY_YEAR}"

  # sample mv command: mv 2017-01-ip-adress-time.txt 2017
  mv "${YESTERDAY_YEAR}-${YESTERDAY_MONTH}-"*.txt "${YESTERDAY_YEAR}" \
     2> '/dev/null'

  cd '..'
}


move_to_archive 'isp-ip-address'
move_to_archive 'ping-test'
move_to_archive 'speed-test'


exit 0<commit_msg>adm-url monthly move<commit_after>#!/bin/bash
#
# move log files to archive folder
#
# run by cron the 1st of every month
#
# <EMAIL> 11.02.2017
#

cd './Dropbox' 2> '/dev/null'


YESTERDAY_YEAR=$(date --date='15 days ago' +%Y)
YESTERDAY_MONTH=$(date --date='15 days ago' +%m)


move_to_archive () {
  local LOG_FOLDER="${1}"

  mkdir -p "${LOG_FOLDER}"

  cd "${LOG_FOLDER}"

  mkdir -p "${YESTERDAY_YEAR}"

  # sample mv command: mv 2017-01-ip-adress-time.txt 2017
  mv "${YESTERDAY_YEAR}-${YESTERDAY_MONTH}-"*.txt "${YESTERDAY_YEAR}" \
     2> '/dev/null'

  cd '..'
}


move_to_archive 'isp-ip-address'
move_to_archive 'adm-url'
move_to_archive 'ping-test'
move_to_archive 'speed-test'


exit 0
{'fraction_non_alphanumeric': 0.17901687454145268, 'fraction_numerical': 0.03961848862802641, 'mean_word_length': 3.8197879858657244, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2933578', 'n_tokens_mistral': 644, 'n_tokens_neox': 571, 'n_words': 127}