Left: | ||
Right: |
OLD | NEW |
---|---|
(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 | |
OLD | NEW |