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

Delta Between Two Patch Sets: edit.sh

Issue 29761555: #8852 - ldap sync output filter (Closed)
Left Patch Set: #8852 - ldap sync output filter Created June 5, 2018, 1:59 p.m.
Right Patch Set: #8852 - ldap sync output filter Created June 20, 2018, 12:32 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | output.txt » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 #!/bin/sh 1 #!/bin/sh
2 2
3 # Filter out uninformative output lines from the ldap-sync cron job script 3 # Filter out uninformative output lines from the ldap-sync cron job script
4 4
5 last_updated="" 5 last_action=""
6 6
7 while read line; do 7 while read line; do
8 case "$line" in 8 case "$line" in
9 *Updating*|*Creating*) 9 *-\>*)
10 last_updated="$line" 10 if [ ! -z "$last_action" ]
11 then
12 echo "$last_action"
13 fi
14
15 echo "$line"
16 last_action=""
11 ;; 17 ;;
12 *-\>*) 18 --\ Found\ *\ users* | \
mathias 2018/06/05 14:32:19 Is there ever a case where we could encounter mult
13 echo "$last_updated" 19 \#* | \
14 echo "$line" 20 *Synchronizing\ *\ groups* | \
15 ;; 21 \*\*\ Synchronizing\ *\ users* | \
16 *Found* | \ 22 --\ Updating\ user\ \'*\'?\(*\)* | \
17 *\#* | \ 23 --\ Updating\ group\ \'*\'* | \
18 *Synchronizing*) 24 --\ Creating\ user\ \'*\'?\(*\)* | \
19 continue 25 --\ Creating\ group\ \'*\'*)
26 last_action="$line"
20 ;; 27 ;;
21 *) 28 *)
22 echo "$line" 29 echo "$line"
23 ;; 30 ;;
24 esac 31 esac
25 done 32 done
LEFTRIGHT
« no previous file | output.txt » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld