X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/db5fb322a04cdb13328247938ec14bbf85fba338..b97dc9fd9f1529e9216e7525616e81768cd8a173:/new_loba.sh diff --git a/new_loba.sh b/new_loba.sh index 7519afc..ba076fb 100755 --- a/new_loba.sh +++ b/new_loba.sh @@ -25,7 +25,7 @@ EOF fi name=$(echo $1 | tr A-Z a-z) -if ! echo "$name" | grep -q '^[a-z][a-z0-9_]*$' \ +if ! echo "$name" | grep -q '^[a-z0-9_]\+$' \ || ! [ $(echo "$name" | wc -l) = 1 ]; then echo "ERROR: invalid name -- \"$name\"" >&2 exit 1 @@ -125,8 +125,9 @@ nol_insert && $1 ~ /\}/ { } nol_insert && !nol_inserted && /NOL_INSERT/ { - if ($1 > nol_compare) { - print nol_string; + if ($1 >= nol_compare) { + if ($1 > nol_compare) + print nol_string; nol_inserted = 1; } }