diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-09-24 16:51:32 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-09-24 16:51:32 +0200 |
commit | 0741879e11f0deb9c7b0d5abae45aac1fce446f8 (patch) | |
tree | e361350b37935d4d3be0965e9bdd4a6b6f1884c1 | |
parent | 53e1f38514704a43fdf0061a81606e51e94a45fb (diff) |
cron: Deal with '-' in the name of a client.
Do not stop when seeing the first '-'. E.g. if you have names like
tpe-system1, tpe-system2 they were treated as tpe and it was possible
that a currently opened file was deleted.
-rwxr-xr-x | contrib/osmo_pcap_clean_old | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/osmo_pcap_clean_old b/contrib/osmo_pcap_clean_old index 2af69df..640441e 100755 --- a/contrib/osmo_pcap_clean_old +++ b/contrib/osmo_pcap_clean_old @@ -62,7 +62,7 @@ do_zip() done } -find . -name "trace-*" |sed -e "s/.*trace-\([^-]\+\).*/\1/" |sort |uniq | while read CLIENT; do +find . -name "trace-*" |sed -e "s/.*trace-\(.*\)-\(.*\).pcap.*/\1/" |sort |uniq | while read CLIENT; do [ $VERBOSE -eq 1 ] && echo "Cleaning logs for $CLIENT" if [ "x$METHOD" == "xAGE" ]; then |