diff options
author | Rasmus Steinke <rasi@xssn.at> | 2015-12-05 06:49:30 +0100 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2015-12-05 06:49:30 +0100 |
commit | 4401f08faaaa624e5961b724a65995c4e22771e8 (patch) | |
tree | 176ca87b6f73c6a05037ec76047d7d81318b9e5e /clerk | |
parent | ba44a2f6b9ab057884a3d345a9d4667f1809e4c6 (diff) | |
download | perl-app-clerk-4401f08faaaa624e5961b724a65995c4e22771e8.tar.gz perl-app-clerk-4401f08faaaa624e5961b724a65995c4e22771e8.tar.xz |
dont add duplicates
Diffstat (limited to 'clerk')
-rwxr-xr-x | clerk | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -1325,7 +1325,7 @@ ${line2}</span>" | gawk '{print substr($0, 2, length($0) - 2)}') if [[ $val -eq 11 ]]; then - echo "$ALBUM" | while read line; do + echo "$ALBUM" | uniq | while read line; do ALBUM="$line" artist=$(echo -en "$ALBUM" \ | gawk -F '\t' '{ print $1 }' \ @@ -1341,7 +1341,7 @@ ${line2}</span>" elif [[ $val -eq 12 ]]; then mpc clear; - echo "$ALBUM" | while read line; do + echo "$ALBUM" | uniq | while read line; do ALBUM="$line" artist=$(echo -en "$ALBUM" \ | gawk -F '\t' '{ print $1 }' \ @@ -1366,7 +1366,7 @@ ${line2}</span>" else mpc clear; - echo "$ALBUM" | while read line; do + echo "$ALBUM" | uniq | while read line; do ALBUM="$line" # echo "$ALBUM" | while read line; do artist=$(echo -en "$ALBUM" \ @@ -1384,7 +1384,7 @@ ${line2}</span>" fi elif [[ $val -eq 10 ]]; then - echo "$ALBUM" | while read line; do + echo "$ALBUM" | uniq | while read line; do ALBUM="$line" # echo "$ALBUM" | while read line; do artist=$(echo -en "$ALBUM" \ @@ -1522,7 +1522,7 @@ TRACK="$(dmenu_t \ if [[ $val -eq 11 ]]; then filename=$(echo "$TRACK" | gawk -F "\t" '{print $6}') - echo "$filename" | while read line; do + echo "$filename" | uniq | while read line; do mpc insert "${line}" done exit @@ -1530,7 +1530,7 @@ TRACK="$(dmenu_t \ elif [[ $val -eq 12 ]]; then filename=$(echo "$TRACK" | gawk -F "\t" '{print $6}') mpc clear; - echo "$filename" | while read line; do + echo "$filename" | uniq | while read line; do mpc add "${line}" done mpc play @@ -1538,7 +1538,7 @@ TRACK="$(dmenu_t \ elif [[ $val -eq 10 ]]; then filename=$(echo "$TRACK" | gawk -F "\t" '{print $6}') - echo "$filename" | while read line; do + echo "$filename" | uniq | while read line; do mpc add "${line}" done exit @@ -1550,7 +1550,7 @@ TRACK="$(dmenu_t \ addTrackTags else filename=$(echo "$TRACK" | gawk -F "\t" '{print $6}') - echo "$filename" | while read line; do + echo "$filename" | uniq | while read line; do mpc add "${line}" done exit |