First Commit

This commit is contained in:
Guy Boisvert 2025-08-12 23:01:13 -04:00
commit bd67283438
142 changed files with 5061 additions and 0 deletions

View file

@ -0,0 +1,34 @@
#!/bin/bash
INI_FILE="$1"
SECTIONS_NUM=0
unset ${INI_ALL_SECTION}
while read -r line || [ -n "$line" ]
do
echo -e "\nLine = $line"
# Skip blank lines and comments
if [ -z "$line" -o "${line:0:1}" = ";" -o "${line:0:1}" = "#" ]
then
continue
fi
# Section marker?
if [[ "${line}" =~ ^\[[a-zA-Z0-9_]{1,}\]$ ]]
then
# Set SECTION var to name of section (strip [ and ] from section marker)
SECTION="${line#[}"
SECTION="${SECTION%]}"
echo -e "SECTION = ${SECTION}"
#eval "${INI_ALL_SECTION}=\"\${${INI_ALL_SECTION}# } $SECTION\""
((SECTIONS_NUM++))
continue
fi
done <"${INI_FILE}"
echo -e "SECTIONS_NUM = $SECTIONS_NUM"
echo "INI_ALL_SECTION = $INI_ALL_SECTION"