matejak / argbash

Bash argument parsing code generator
Other
1.4k stars 62 forks source link

autom4te Error: invalid command code m, end of file in string: syntax error in expression #160

Closed ok-dok closed 2 years ago

ok-dok commented 2 years ago

I got an error when run the command :

argbash -o register-dns.sh register-dns.m4

m4:stdin:45: ERROR: end of file in string autom4te: error: /usr/local/opt/m4/bin/m4 failed with exit status: 1 sed: 1: "m4:stdin:45: ERROR: end ...": invalid command code m /usr/local/bin/argbash: line 300: m4:stdin:45: ERROR: end of file in string: syntax error in expression (error token is ":stdin:45: ERROR: end of file in string")

I add my script commands in my register-dns.m4 file, after the comment '# vvv PLACE YOUR CODE HERE vvv'. such as: function error(){ echo -e "\e[31m[ERRO]\e[0m $*" }

the custom code is only this function code.

I think the '\e[31m' or '\e[0m' code is keypoint, it leads an error report.

anybody could help me to fix this problem please?

ok-dok commented 2 years ago

ok, I solved it used comment in that line '#]]'.