From c1b56b5b18320178e0a37eb84061a3785e920dba Mon Sep 17 00:00:00 2001 From: sev Date: Thu, 25 Jan 2024 19:40:06 -0600 Subject: [PATCH] apkgvers: replace grep/sed with awk --- apkgvers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apkgvers b/apkgvers index 135f0a6..51256ce 100755 --- a/apkgvers +++ b/apkgvers @@ -1,3 +1,3 @@ #!/bin/sh if ! which column >/dev/null 2>&1; then echo need column command >&2; exit 1; fi -grep pkgver= */APKBUILD | sort | sed -e 's_/APKBUILD:pkgver=_ _' | column -tNname,version -R1 +awk 'match($0, /pkgver="?([^" ;]*)/, m) {gsub("/APKBUILD$", "", FILENAME); print FILENAME, m[1]}' */APKBUILD | sort | column -tNname,version -R1 -- 2.47.1