1
0
mirror of https://github.com/albfan/bash-ini-parser.git synced 2025-08-04 19:42:06 +03:00

Remove hashtag comments

This commit is contained in:
Bruno Galindro da Costa
2017-01-27 17:26:11 -02:00
committed by Alberto Fanjul
parent 86622e1cbe
commit 871153778b

View File

@@ -30,6 +30,8 @@ function cfg_parser {
debug
ini=( ${ini[*]//;*/} ) # remove comments with ;
debug
ini=( ${ini[*]//\#*/} ) # remove comments with #
debug
ini=( ${ini[*]/#+([[:space:]])/} ) # remove init whitespace
debug "whitespace around"
ini=( ${ini[*]/*([[:space:]])=*([[:space:]])/=} ) # remove whitespace around =