[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Antiright-devel] antiright/src ACE
From: |
Jeffrey Bedard |
Subject: |
[Antiright-devel] antiright/src ACE |
Date: |
Sun, 26 Mar 2006 07:16:35 +0000 |
CVSROOT: /sources/antiright
Module name: antiright
Branch:
Changes by: Jeffrey Bedard <address@hidden> 06/03/26 07:16:35
Modified files:
src : ACE
Log message:
Fixed problem with AWK variable not being set.
Improved ACE_read_configuration_value to use variable insertion as
provided by awk itself, rather than funky quote stuff.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/antiright/antiright/src/ACE.diff?tr1=1.65&tr2=1.66&r1=text&r2=text
Patches:
Index: antiright/src/ACE
diff -u antiright/src/ACE:1.65 antiright/src/ACE:1.66
--- antiright/src/ACE:1.65 Sun Mar 19 04:04:10 2006
+++ antiright/src/ACE Sun Mar 26 07:16:35 2006
@@ -21,7 +21,9 @@
echo $COUNTER
set -vx
fi
+
ARSHELL=arshell
+AWK=awk
ACE_Verification()
{
@@ -55,13 +57,15 @@
}
ACE_record_titles()
{
- $AWK -F: 'NF > 0 {if ($0 !~ /#/){print $1}}' ~/.antiright\
+ awk -F : 'NF > 0 {if ($0 !~ /#/){print $1}}' ~/.antiright\
| sort | uniq | tr '\n' ' '
}
ACE_read_configuration_value()
{
# This prints values of records matching $1 that do not contain # characters
- $AWK -F: '/'$1'/ {if ($0 !~ /#/) value=$2}\
+ $AWK -v config_item=$1 '\
+ BEGIN {FS=":"}\
+ $0 ~ config_item {if ($0 !~ /#/) value=$2}\
END {print value}' ~/.antiright
# The value is printed in the end to ensure that it is the most recent value
}