summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-06-07 18:39:29 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-06-07 18:39:29 +0200
commit8871d7ffdc1fcd683be9ad155058c0e1538da46e (patch)
treee1a3f81159fa7f3d17967a989b275dba144f455f
parentf9aadbefce278cc38c686d398526ad6986a0fb4c (diff)
downloadw3watch-8871d7ffdc1fcd683be9ad155058c0e1538da46e.tar.gz
w3watch-8871d7ffdc1fcd683be9ad155058c0e1538da46e.tar.xz
ignore empty lines
-rwxr-xr-xw3watch6
1 files changed, 3 insertions, 3 deletions
diff --git a/w3watch b/w3watch
index 6eabdd4..2c3fbe3 100755
--- a/w3watch
+++ b/w3watch
@@ -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