From 40c3f41c9f858c5a1a97340e44066e65d16d57d3 Mon Sep 17 00:00:00 2001 From: Jimmi Holst Christensen Date: Sat, 8 Jun 2024 17:22:38 +0200 Subject: [PATCH] ini: Fix awk script for finding sections --- dipm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dipm b/dipm index 56cc9be..c17ef46 100755 --- a/dipm +++ b/dipm @@ -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() {