Commit cf2d1261 authored by Jonathan Schaeffer's avatar Jonathan Schaeffer

Correction de la regex

parent e5a88891
......@@ -83,7 +83,7 @@ function test_random_file {
target_file_date=$(date +%s -d $(stat $target_file --print %z | awk '{print $1}'))
fname=$(echo $target_file | awk -F'/' '{print $NF}')
echo $fname
regex="([A-Z0-9]+)\.([A-Z]+)\.[0-9]*\.([A-Z0-9]{3}\.D)\.([12][0-9]{3})\.[0-3][0-9]{2}"
regex="([A-Z0-9]+)\.([A-Z]+)\.[A-Z0-9]*\.([A-Z0-9]{3}\.D)\.([12][0-9]{3})\.[0-3][0-9]{2}"
archive_file=""
if [[ $fname =~ $regex ]]; then
archive_file="$archivedir/${BASH_REMATCH[4]}/${BASH_REMATCH[1]}/${BASH_REMATCH[2]}/${BASH_REMATCH[3]}/$fname";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment