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 last_updated="" | |
7 | |
8 while read line; do | |
9 case "$line" in | |
10 *Updating*|*Creating*) | |
mathias
2018/06/11 14:10:56
Please make the patterns a bit more specific, in o
| |
11 last_updated="$line" | |
12 ;; | |
13 *-\>*) | |
14 case "$last_action" in | |
mathias
2018/06/11 14:10:56
It is not a good idea to base the decision whether
| |
15 *-\>*) | |
16 echo "$line" | |
17 ;; | |
18 *) | |
19 echo "$last_updated" | |
20 echo "$line" | |
21 ;; | |
22 esac | |
23 ;; | |
24 *Found* | \ | |
25 *\#* | \ | |
26 *Synchronizing*) | |
27 continue | |
28 ;; | |
29 *) | |
30 echo "$line" | |
31 ;; | |
32 esac | |
33 | |
34 last_action="$line" | |
35 done | |
OLD | NEW |