Initial commit.
This commit is contained in:
commit
2dda2e227d
52 changed files with 2704 additions and 0 deletions
23
bits/sanatise_section/sanatise_section
Executable file
23
bits/sanatise_section/sanatise_section
Executable 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
|
||||
8
bits/sanatise_section/sanatise_section.ini
Normal file
8
bits/sanatise_section/sanatise_section.ini
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[test 1]
|
||||
[ test 2]
|
||||
[ test 3 ]
|
||||
[ test 4 ]
|
||||
[ test 5 ]
|
||||
[ test 6 ]
|
||||
[ test 7 ]
|
||||
[test 8]
|
||||
Loading…
Add table
Add a link
Reference in a new issue