Skip to content

Instantly share code, notes, and snippets.

@gusalbukrk
Created September 14, 2023 12:11
Show Gist options
  • Save gusalbukrk/d75c5a567486f7606715a591a0469ead to your computer and use it in GitHub Desktop.
Save gusalbukrk/d75c5a567486f7606715a591a0469ead to your computer and use it in GitHub Desktop.
#bash
#!/bin/bash
# directory="$HOME/gists_backup/"
# file_list=$(find "$directory" -mindepth 1 -maxdepth 1 -type d)
# for file in $file_list; do
# dir_name=$(basename "$file")
# echo "Processing file: $dir_name"
# done
#####
csv_file="$HOME/gists_backup/descriptions.csv"
declare -A data_array
while IFS=',' read -r hash description private; do
unquoted=$(echo "$description" | tr -d '"');
rm -rf $HOME/gists_backup/$hash/.git
mv $HOME/gists_backup/$hash/ "$HOME/gists_backup/$unquoted/";
done < "$csv_file"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment