Index: edit.sh |
diff --git a/edit.sh b/edit.sh |
new file mode 100755 |
index 0000000000000000000000000000000000000000..f4c25474c4533751cf4ddb9c79e3ea6f9d755e94 |
--- /dev/null |
+++ b/edit.sh |
@@ -0,0 +1,28 @@ |
+#!/bin/sh |
+ |
+# Filtering out uninformative output lines from the ldap-sync cron job script |
f.lopez
2018/05/29 21:18:48
I don't think this script is only for cron jobs, e
|
+ |
+last_updated="" |
+ |
+while read line; do |
+ |
f.lopez
2018/05/29 21:18:49
be consistent here, either always use a blank line
|
+ case $line in |
+ |
f.lopez
2018/05/29 21:18:48
not blank lines here either
|
+ *Updating*|*Creating*) |
+ last_updated="$line" |
+ ;; |
+ |
f.lopez
2018/05/29 21:18:48
not blank lines between each option either
|
+ *-\>*) |
+ echo $last_updated |
f.lopez
2018/05/29 21:18:48
this is a regression, I mentioned in the first cod
|
+ echo $line |
+ ;; |
+ |
+ *Found*|*\#*|*Synchronizing*) |
f.lopez
2018/05/29 21:18:48
We always avoid modifying unrelated changes, in th
|
+ continue |
+ ;; |
+ |
+ *) |
+ echo $line |
+ ;; |
+ esac |
+done |