diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/rvs-core/lib/rvsdb.sh | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/rvs-core/lib/rvsdb.sh b/src/rvs-core/lib/rvsdb.sh index a02304b..01f9e0d 100644 --- a/src/rvs-core/lib/rvsdb.sh +++ b/src/rvs-core/lib/rvsdb.sh @@ -60,19 +60,20 @@ logwrite() { var="$2" val="$3" - #lines=`_find "$log" '1' "$var"` - #if [ "$lines" = '' ]; then - if [ "`lograw "$log" | grep "^$var:"`" == '' ]; then - # no exiswhereting occurances - echo "$var:$val" >> "$log" - else - # found others - # escape slashes - var=`echo "$var" | sed 's:/:\\\\/:g'` - val=`echo "$val" | sed 's:/:\\\\/:g'` - sed -i "s/^$var:.*$/$var:$val/" "$log" - #lograw "$log" | ?????? - fi +# #lines=`_find "$log" '1' "$var"` +# #if [ "$lines" = '' ]; then +# if [ "`lograw "$log" | grep "^$var:"`" == '' ]; then +# # no exiswhereting occurances +# echo "$var:$val" >> "$log" +# else +# # found others +# # escape slashes +# var=`echo "$var" | sed 's:/:\\\\/:g'` +# val=`echo "$val" | sed 's:/:\\\\/:g'` +# sed -i "s/^$var:.*$/$var:$val/" "$log" +# #lograw "$log" | ?????? +# fi + echo "$var:$val" >> $log } # logfind LOG VAL |