You've already forked bash-ini-parser
mirror of
https://github.com/albfan/bash-ini-parser.git
synced 2025-08-06 07:02:37 +03:00
@@ -33,10 +33,10 @@ function cfg_parser {
|
|||||||
debug "escaped ]"
|
debug "escaped ]"
|
||||||
IFS=$'\n' && ini=( ${ini} ) # convert to line-array
|
IFS=$'\n' && ini=( ${ini} ) # convert to line-array
|
||||||
debug
|
debug
|
||||||
ini=( ${ini[*]//;*/} ) # remove comments with ;
|
ini=( ${ini[*]/#*([[:space:]]);*/} )
|
||||||
debug
|
debug "remove ; comments"
|
||||||
ini=( ${ini[*]//\#*/} ) # remove comments with #
|
ini=( ${ini[*]/#*([[:space:]])\#*/} )
|
||||||
debug
|
debug "remove # comments"
|
||||||
ini=( ${ini[*]/#+([[:space:]])/} ) # remove init whitespace
|
ini=( ${ini[*]/#+([[:space:]])/} ) # remove init whitespace
|
||||||
debug
|
debug
|
||||||
ini=( ${ini[*]/%+([[:space:]])/} ) # remove ending whitespace
|
ini=( ${ini[*]/%+([[:space:]])/} ) # remove ending whitespace
|
||||||
|
Reference in New Issue
Block a user