Commit bf9627a6 authored by Marc-Antoine Drouin's avatar Marc-Antoine Drouin
Browse files

improve MF file checking

parent 74df2f46
......@@ -284,6 +284,7 @@ for file_ in "${input_files[@]}"; do
"MF")
awk --posix -v cl31_cor="$cl31_cor" -v prof_n_chars="$prof_n_chars" -v prof_n_chars_p1="$prof_n_chars_p1" '\
BEGIN {l=1;p=0;e=0;printf "" > cl31_cor}
l==1 {if ($0 ~ "File") {next}}
l==1 {if ($0 ~ /^[\001]$/) {l++;bloc=$0;e=0;next} else if (e==1) {next} else e=1}
l==2 {if ($0 ~ /^-[0-9-]{10} [0-9:]{8}$/) {l++;bloc=bloc"\n"$0;next} else e=1}
l==3 {if ($0 ~ /^ CL.{6}[\002].$/) {l++;bloc=bloc"\n"$0;next} else e=1}
......
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