Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
IPSL
SIRTA
CL31
CL raw to 1a
Commits
74df2f46
Commit
74df2f46
authored
Feb 24, 2022
by
Marc-Antoine Drouin
Browse files
correct bug in SIRTA checking
parent
5940cad3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
run_raw2l1.sh
run_raw2l1.sh
+4
-2
No files found.
run_raw2l1.sh
View file @
74df2f46
...
...
@@ -165,7 +165,7 @@ if [[ $ERREUR != 0 ]]; then
fi
if
[[
$fich_type
!=
"SIRTA"
&&
$fich_type
!=
"MF"
]]
;
then
echo
"Le type de fichier doit etre SIRTA, MF
ou P7
"
echo
"Le type de fichier doit etre SIRTA, MF"
exit
1
fi
...
...
@@ -262,6 +262,8 @@ for file_ in "${input_files[@]}"; do
prof_n_chars
=
$((
n_gates
*
N_CHAR_GATES
))
prof_n_chars_p1
=
$((
prof_n_chars
+
1
))
consignerMsg
"number of vertical gates:
$n_gates
"
case
$fich_type
in
"SIRTA"
)
awk
--posix
-v
cl31_cor
=
"
$cl31_cor
"
-v
prof_n_chars
=
"
$prof_n_chars
"
-v
prof_n_chars_p1
=
"
$prof_n_chars_p1
"
'\
...
...
@@ -274,7 +276,7 @@ for file_ in "${input_files[@]}"; do
l==4 {if (NF==10) {l++;bloc=bloc"\n"$0;next} else e=1}
l==5 {if (NF==10) {l++;bloc=bloc"\n"$0;next} else e=1}
l==6 {if (length($0) == prof_n_chars || length($0) == prof_n_chars_p1) {l++;bloc=bloc"\n"$0;next} else e=1}
l==7 {if ($0 ~ /^[\003][0-9a-z]{4}[\004].$/) {p=1;bloc=bloc"\n"$0} else e=1}
l==7 {if ($0 ~ /^[\003][0-9a-z]{4}[\004].
?
$/) {p=1;bloc=bloc"\n"$0} else e=1}
p==1 {printf bloc"\n" >> cl31_cor;l=1;p=0}
e==1 {err++;print NR;l=1}
END {if ($0 ~ "File") printf "\n%s\n",$0>>cl31_cor; if (err>0)print "err=",err}'
"
$file_
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment