From ce6157efee8f3e69a9996f847a3aea4c0e5f6311 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 25 Oct 2009 20:13:50 +0100 Subject: [PATCH] begin to cleanup ugly awk line Using ENVIRON[] instead of ugly quoting Signed-off-by: Nico Schottelius --- ccollect.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ccollect.sh b/ccollect.sh index f940fef..7e16dd6 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -427,7 +427,11 @@ while [ "${i}" -lt "${no_sources}" ]; do # incomplete="$(echo \ $(pcmd ls -1 "${ddir}/" | \ - awk "/\.${CMARKER}\$/ { print \$0; gsub(\"\.${CMARKER}\$\",\"\",\$0); print \$0 }" | \ + awk '/\.ENVIRON["CMARKER"]$/ { + print $0; + gsub("\." ENVIRON["CMARKER"]$","",$0); + print $0 + }' | \ tee "${TMP}"))" if [ "${incomplete}" ]; then