From 9d5e1271a4f17f0d6abaa51198c14ae5ab3d96d6 Mon Sep 17 00:00:00 2001 From: ayakael Date: Sun, 10 Feb 2019 12:02:47 -0500 Subject: [PATCH] [print_meta_mtag] Fixed bug where sometimes first tag wouldn't get parsed --- src/print_meta_mtag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/print_meta_mtag b/src/print_meta_mtag index 2f009c2..ac2c102 100644 --- a/src/print_meta_mtag +++ b/src/print_meta_mtag @@ -22,7 +22,7 @@ print_meta_mtag() { # If list of Tags isn't giving, assumes that we want to output all tags, and thus this # generates all tags present in MTAG file - [[ -z "${tagList[@]}" ]] && local tagList=($(awk 'BEGIN{RS="[,]?\n";FS=" : "}{if($1!~"@"){print $1}}' ${FILE} | tr -d '[]{}" ' | awk '!seen[$0]++' | tail -n +3)) + [[ -z "${tagList[@]}" ]] && local tagList=($(awk 'BEGIN{RS="[,]?\n";FS=" : "}{if($1!~"@"){print $1}}' ${FILE} | tr -d '[]{}" ' | awk '!seen[$0]++' | sed '/^&/d' | tail -n +2 )) # Goes through every tag, determines it's original value, and then prints out.