Initial commit.

This commit is contained in:
Darren 'Tadgy' Austin 2019-07-16 12:41:49 +01:00
commit 2dda2e227d
52 changed files with 2704 additions and 0 deletions

View file

@ -0,0 +1,23 @@
#!/bin/bash
INIFILE=sanatise_section.ini
if ! exec 10<"$INIFILE"; then
echo "${0##*/}: $INIFILE: failed to open"
return 1
fi
shopt -s extglob
# Parse the ini file
IFS=$'\n'
BUFFER=""
while :; do
# Read a line of input from the file descriptor
read -u 10 LINE || break
# printf -- "->%s<-\n" "$LINE"
LINE="${LINE/#*([[:blank:]])\[*([[:blank:]])/}"
LINE="${LINE/%*([[:blank:]])\]*([[:blank:]])/}"
printf -- "->%s<-\n" "$LINE"
done

View file

@ -0,0 +1,8 @@
[test 1]
[ test 2]
[ test 3 ]
[ test 4 ]
[ test 5 ]
[ test 6 ]
[ test 7 ]
[test 8]