Skip to content

Commit

Permalink
ini: Fix awk script for finding sections
Browse files Browse the repository at this point in the history
  • Loading branch information
Hejsil committed Jun 8, 2024
1 parent 5bacd18 commit 40c3f41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dipm
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ usage() {

ini_section() {
section=$1
awk "/\[.*\]/ {print_it=0} /^\[$section\]$/ {print_it=1} print_it"
awk "/^\[.*\]$/ {print_it=0} /^\[$section\]$/ {print_it=1} print_it"
}

ini_delete_section() {
section=$1
awk "/\[.*\]/ {print_it=1} /^\[$section\]$/ {print_it=0} print_it"
awk "/^\[.*\]$/ {print_it=1} /^\[$section\]$/ {print_it=0} print_it"
}

ini_field() {
Expand Down

0 comments on commit 40c3f41

Please sign in to comment.