Left: | ||
Right: |
OLD | NEW |
---|---|
(Empty) | |
1 #!/bin/sh | |
2 | |
3 # Filtering out uninformative output lines from the ldap-sync cron job script | |
f.lopez
2018/05/29 21:18:48
I don't think this script is only for cron jobs, e
| |
4 | |
5 last_updated="" | |
6 | |
7 while read line; do | |
8 | |
f.lopez
2018/05/29 21:18:49
be consistent here, either always use a blank line
| |
9 case $line in | |
10 | |
f.lopez
2018/05/29 21:18:48
not blank lines here either
| |
11 *Updating*|*Creating*) | |
12 last_updated="$line" | |
13 ;; | |
14 | |
f.lopez
2018/05/29 21:18:48
not blank lines between each option either
| |
15 *-\>*) | |
16 echo $last_updated | |
f.lopez
2018/05/29 21:18:48
this is a regression, I mentioned in the first cod
| |
17 echo $line | |
18 ;; | |
19 | |
20 *Found*|*\#*|*Synchronizing*) | |
f.lopez
2018/05/29 21:18:48
We always avoid modifying unrelated changes, in th
| |
21 continue | |
22 ;; | |
23 | |
24 *) | |
25 echo $line | |
26 ;; | |
27 esac | |
28 done | |
OLD | NEW |