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 6, 2018, 11:30 a.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_action="" 5 last_action=""
6 last_updated=""
7 6
8 while read line; do 7 while read line; do
9 case "$line" in 8 case "$line" in
10 *Updating*|*Creating*) 9 *-\>*)
11 last_updated="$line" 10 if [ ! -z "$last_action" ]
11 then
12 echo "$last_action"
13 fi
14
15 echo "$line"
16 last_action=""
12 ;; 17 ;;
13 *-\>*) 18 --\ Found\ *\ users* | \
14 case "$last_action" in 19 \#* | \
15 *-\>*) 20 *Synchronizing\ *\ groups* | \
16 echo "$line" 21 \*\*\ Synchronizing\ *\ users* | \
17 continue 22 --\ Updating\ user\ \'*\'?\(*\)* | \
18 ;; 23 --\ Updating\ group\ \'*\'* | \
19 esac 24 --\ Creating\ user\ \'*\'?\(*\)* | \
20 echo "$last_updated" 25 --\ Creating\ group\ \'*\'*)
21 echo "$line" 26 last_action="$line"
22 ;;
23 *Found* | \
24 *\#* | \
25 *Synchronizing*)
26 continue
27 ;; 27 ;;
28 *) 28 *)
29 echo "$line" 29 echo "$line"
30 ;; 30 ;;
31 esac 31 esac
32
33 last_action="$line"
34 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