| Index: edit.sh |
| diff --git a/edit.sh b/edit.sh |
| new file mode 100755 |
| index 0000000000000000000000000000000000000000..d4c1e239aa69f1e67453424557c2c8376276906b |
| --- /dev/null |
| +++ b/edit.sh |
| @@ -0,0 +1,35 @@ |
| +#!/bin/sh |
| + |
| +# Filter out uninformative output lines from the ldap-sync cron job script |
| + |
| +last_action="" |
| +last_updated="" |
| + |
| +while read line; do |
| + case "$line" in |
| + *Updating*|*Creating*) |
|
mathias
2018/06/11 14:10:56
Please make the patterns a bit more specific, in o
|
| + last_updated="$line" |
| + ;; |
| + *-\>*) |
| + case "$last_action" in |
|
mathias
2018/06/11 14:10:56
It is not a good idea to base the decision whether
|
| + *-\>*) |
| + echo "$line" |
| + ;; |
| + *) |
| + echo "$last_updated" |
| + echo "$line" |
| + ;; |
| + esac |
| + ;; |
| + *Found* | \ |
| + *\#* | \ |
| + *Synchronizing*) |
| + continue |
| + ;; |
| + *) |
| + echo "$line" |
| + ;; |
| + esac |
| + |
| + last_action="$line" |
| +done |