diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2010-06-07 18:39:29 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2010-06-07 18:39:29 +0200 |
commit | 8871d7ffdc1fcd683be9ad155058c0e1538da46e (patch) | |
tree | e1a3f81159fa7f3d17967a989b275dba144f455f | |
parent | f9aadbefce278cc38c686d398526ad6986a0fb4c (diff) | |
download | w3watch-8871d7ffdc1fcd683be9ad155058c0e1538da46e.tar.gz w3watch-8871d7ffdc1fcd683be9ad155058c0e1538da46e.tar.xz |
ignore empty lines
-rwxr-xr-x | w3watch | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -51,11 +51,11 @@ edit() { } list() { - grep -v '^#' "${CONFIGFILE}" + grep '^[^#]' "${CONFIGFILE}" } check() { - grep -v '^#' "${CONFIGFILE}" | while read line; do + grep '^[^#]' "${CONFIGFILE}" | while read line; do data=(${line}) url="${data[0]}" filter="${data[@]:1}" @@ -97,7 +97,7 @@ collectGarbage() { for cacheEntry in "${CACHEDIR}/"*; do cacheSum=$(basename "$cacheEntry") - grep -v '^#' "${CONFIGFILE}" | while read configEntry; do + grep '^[^#]' "${CONFIGFILE}" | while read configEntry; do configSum=$(echo "$configEntry" | sha1sum | awk '{print $1;}') if [ "$cacheSum" == "$configSum" ]; then |