From 31e026a5443062c206f0135292cdc38765f20e90 Mon Sep 17 00:00:00 2001 From: drowe67 Date: Tue, 30 Oct 2012 03:56:21 +0000 Subject: [PATCH] debug notes git-svn-id: https://svn.code.sf.net/p/freetel/code@896 01035d8c-6547-0410-b346-abe4f91aad63 --- mini-asterisk-gui2/cgi-bin/setlinekey2.cgi | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mini-asterisk-gui2/cgi-bin/setlinekey2.cgi b/mini-asterisk-gui2/cgi-bin/setlinekey2.cgi index 55efdb0b..735fb236 100755 --- a/mini-asterisk-gui2/cgi-bin/setlinekey2.cgi +++ b/mini-asterisk-gui2/cgi-bin/setlinekey2.cgi @@ -36,11 +36,8 @@ echo $this echo $that echo $key if [ -f $file ]; then -# sed -i "s/\($this\)[a-z0-9\.]*\(.*$key.*\)/\1$that\2/" $file -#rhs=`cat $file | grep -oe "$this.*$key" | grep -oe "$this[a-z0-9\.]*" | sed -n "s/$this//p"` -#cat $file | sed "s/$rhs/$that/" -# testversion: -perl -i -pe "s/($this)[a-z0-9\.]*(.*$key.*)/$this$that\$2/" $file + # to debug remove -i (write results to file), it will then just print results + perl -i -pe "s/($this)[a-z0-9\.]*(.*$key.*)/$this$that\$2/" $file else echo "$file does not exist" fi -- 2.25.1