contrib: Use sed with extended regexps

This makes the regular expression easier to read since less characters
need to be escaped.
This commit is contained in:
Daniel Willmann 2011-10-20 18:51:04 +02:00
parent 5a1c292140
commit 02e19c7e50
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ do_zip()
}
# Use an explicit pattern here
find . -name "trace-*.pcap*" |sed -n -e "s/.*trace-\(.\+\)-[0-9]\{8\}_[0-9]\{6\}\.pcap\(\..\+\)\?/\1/p" |sort |uniq | while read CLIENT; do
find . -name "trace-*.pcap*" |sed -n -re "s/.*trace-(.+)-[0-9]{8}_[0-9]{6}\.pcap(\..+)?/\1/p" |sort |uniq | while read CLIENT; do
[ $VERBOSE -eq 1 ] && echo "Cleaning logs for $CLIENT"