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

Side by Side Diff: edit.sh

Issue 29761555: #8852 - ldap sync output filter (Closed)
Patch Set: #8852 - ldap sync output filter Created June 12, 2018, 2:50 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | output.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/sh
2
3 # Filter out uninformative output lines from the ldap-sync cron job script
4
5 last_action=""
6
7 while read line; do
8 case "$line" in
9 *-\>*)
10 case "$last_action" in
mathias 2018/06/19 13:12:39 As discussed, please replace the inner `case` stat
11 *-\>*)
12 echo "$line"
13 ;;
14 *)
15 echo "$last_action"
16 echo "$line"
17 last_action="$line"
18 ;;
19 esac
20 ;;
21 *Found*users* | \
mathias 2018/06/19 13:12:40 How about `"* Found * users *"`?
22 *\#* | \
23 *Synchronizing*groups* | \
24 *Synchronizing*users* | \
25 *Updating?user?\'*\'?\(*\)* | \
26 *Updating?group?\'*\'* | \
27 *Creating?user?\'*\'?\(*\)* | \
28 *Creating?group?\'*\'*)
29 last_action="$line"
30 continue
mathias 2018/06/19 13:12:39 Not: The `continue` statement is not exactly neces
31 ;;
32 *)
33 echo "$line"
34 ;;
35 esac
36 done
OLDNEW
« no previous file with comments | « no previous file | output.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld