Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: edit.sh

Issue 29761555: #8852 - ldap sync output filter (Closed)
Patch Set: #8852 - ldap sync output filter Created May 23, 2018, 12:15 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | output.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | output.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld