diff --git a/bin/rename-reserve.bash b/bin/rename-reserve.bash index a11e2fe..6fcfa99 100755 --- a/bin/rename-reserve.bash +++ b/bin/rename-reserve.bash @@ -43,10 +43,12 @@ do mv -v "${reserve_show_dir}" "${reserve_dir}/${Timestamp_Epoch}_${Host_ID}_${Key}_${Host_Name}_${Title}" done < <( find "${upload_dir}" -type d -iname "*_9999_*" ) +detox -r -v "${reserve_dir}" + ls -1 "${reserve_dir}" | awk -F '_' '{ $2=""; $3=""; print}' | while read line do upload_epoch="$( echo "${line}" | awk '{print $1}' )" upload_iso8601="$( \date -d "@${upload_epoch}" +%Y-%m-%d )" echo "${upload_iso8601} $( echo ${line} | awk '{ $1=""; print}' )" done > "${reserve_file}" -cat "${reserve_file}" +nl "${reserve_file}"