From d80a5c8e380fa9a55f883de6430c314db03003fd Mon Sep 17 00:00:00 2001 From: gruppi Date: Mon, 6 Apr 2020 16:32:03 -0400 Subject: [PATCH] Remove sh --- features/landmarks/fix_filenames.sh | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100755 features/landmarks/fix_filenames.sh diff --git a/features/landmarks/fix_filenames.sh b/features/landmarks/fix_filenames.sh deleted file mode 100755 index 341f56d..0000000 --- a/features/landmarks/fix_filenames.sh +++ /dev/null @@ -1,25 +0,0 @@ - -#!bin/bash -declare -A news_groups -news_groups=( ["fasttext_300_Infowars-The Gateway Pundit-Veterans Today-Newswars-Prison Planet"]="news_group1" - ["fasttext_300_National Review-Fox News-Real Clear Politics-Washington Examiner-Investors Business Daily"]="news_group4" - ["fasttext_300_Reuters-CNN-CBS News-ABC News-The Hill"]="news_group3" - ["fasttext_300_RT-Sputnik-Tass-Russia-Insider-Fort Russ"]="news_group6" - ["fasttext_300_Talking Points Memo-Raw Story-Daily Kos-Crooks and Liars-Media Matters for America"]="news_group2" - ["fasttext_300_The Daily Caller-Breitbart-RedState-Hot Air-TheBlaze"]="news_group5" - ["fasttext_300_The Guardian UK-The Independent-Evening Standard-BBC UK-The Daily Mirror-The Sun-Birmingham Mail"]="news_group7") - -parent_dir="raw" -for i in $parent_dir/*; do - for j in "$i"/*.txt ; - do mv -- "$j" "${j%.txt}.vec"; - done ; -done - - -for i in $parent_dir/*; do - for j in "$i"/*.vec ; do - echo $(basename "$j") "${news_groups[$(basename "${j%.vec}")]}" - mv -- "$j" $(dirname "$j")/"${news_groups["$(basename "${j%.vec}")"]}.vec" - done -done