mrbaseman / parse_yaml

a simple yaml parser implemented in bash
GNU General Public License v3.0
165 stars 37 forks source link

Escaped ampersand is not a known regexp operator #4

Closed ghost closed 4 years ago

ghost commented 4 years ago

Error:

awk: cmd. line:5: warning: regexp escape sequence `\&' is not a known regexp operator

System details:

$ uname -a
Linux host 5.6.11-arch1-1 #1 SMP PREEMPT Wed, 06 May 2020 17:32:37 +0000 x86_64 GNU/Linux
$ awk --version
GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.0.2, GNU MP 6.2.0)

Fix is to remove the \ from \& on line 5 of the awk command:

        if(match(\$1,/^&/)){anchor[substr(\$1,2)]=full_vn;getline};
mrbaseman commented 4 years ago

thanks, I have merged this fix into master