mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
ini-section.sh: Renamed get_config_section.sh to ini-section.sh
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
78eaef461b
commit
e2ef60eef6
1 changed files with 9 additions and 0 deletions
9
scripts/ini-section.sh
Normal file
9
scripts/ini-section.sh
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
get_conf_sec()
|
||||
{
|
||||
sed -n "/\[$1\]/,/\[/ p" | sed '/]/ d; s/#.*//; /./ !d; s/ *= */=/; s/=\(.*\)/="\1"/'
|
||||
}
|
||||
|
||||
cat $2 | get_conf_sec $1
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue