disable echo escaping and clarify loop var

This commit is contained in:
Connor Olding 2013-05-27 22:09:18 -07:00
parent b4c37ecf3e
commit ea9994a223
2 changed files with 4 additions and 4 deletions

View File

@ -51,8 +51,8 @@ groupreleases() { # groupname [timestamp]
} }
groupfilter() { # groupname regex [timestamp] groupfilter() { # groupname regex [timestamp]
groupreleases "$1" "${3:-}" | while IFS=$SEP read -r title torrent; do groupreleases "$1" "${3:-}" | while IFS=$SEP read -r title etc; do
grep -P "$2" <<< "$title" 1>/dev/null && echo "$title$SEP$torrent" grep -P "$2" <<< "$title" 1>/dev/null && echo -E "$title$SEP$etc"
done done
[ ${PIPESTATUS[0]} = 0 ] || exit 1 [ ${PIPESTATUS[0]} = 0 ] || exit 1
} }
@ -60,7 +60,7 @@ groupfilter() { # groupname regex [timestamp]
cleanup() { cleanup() {
for gs in "${!grouptimes[@]}"; do for gs in "${!grouptimes[@]}"; do
local v="${grouptimes[$gs]}" local v="${grouptimes[$gs]}"
echo "touchgroup $gs $v" >> times.sh echo -E "touchgroup $gs $v" >> times.sh
[ -e "$gs.xml" ] && rm "$gs.xml" [ -e "$gs.xml" ] && rm "$gs.xml"
done done
exit ${1:-1} exit ${1:-1}

2
run
View File

@ -3,7 +3,7 @@ SRCDIR="$(readlink -f "$(dirname "$0")" )"
prettify() { prettify() {
while IFS=$SEP read -r title torrent time; do while IFS=$SEP read -r title torrent time; do
echo "$title"$'\n'"dl:"$'\t'"$torrent"$'\n'"at:"$'\t'"$(date -d @"$time")" echo -E "$title"$'\n'"dl:"$'\t'"$torrent"$'\n'"at:"$'\t'"$(date -d @"$time")"
done done
} }