Index: edit.sh |
diff --git a/edit.sh b/edit.sh |
new file mode 100755 |
index 0000000000000000000000000000000000000000..ab243baa9ad97cf7c3af71f83dfbfba0810bd1b7 |
--- /dev/null |
+++ b/edit.sh |
@@ -0,0 +1,36 @@ |
+#!/bin/sh |
+ |
+# Filter out uninformative output lines from the ldap-sync cron job script |
+ |
+last_action="" |
+ |
+while read line; do |
+ case "$line" in |
+ *-\>*) |
+ case "$last_action" in |
mathias
2018/06/19 13:12:39
As discussed, please replace the inner `case` stat
|
+ *-\>*) |
+ echo "$line" |
+ ;; |
+ *) |
+ echo "$last_action" |
+ echo "$line" |
+ last_action="$line" |
+ ;; |
+ esac |
+ ;; |
+ *Found*users* | \ |
mathias
2018/06/19 13:12:40
How about `"* Found * users *"`?
|
+ *\#* | \ |
+ *Synchronizing*groups* | \ |
+ *Synchronizing*users* | \ |
+ *Updating?user?\'*\'?\(*\)* | \ |
+ *Updating?group?\'*\'* | \ |
+ *Creating?user?\'*\'?\(*\)* | \ |
+ *Creating?group?\'*\'*) |
+ last_action="$line" |
+ continue |
mathias
2018/06/19 13:12:39
Not: The `continue` statement is not exactly neces
|
+ ;; |
+ *) |
+ echo "$line" |
+ ;; |
+ esac |
+done |