Explorar el Código

Remove quotes from return value

Ernesto Nicolás Carrea hace 5 años
padre
commit
f9dbc891ec
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      func/osal.sh

+ 1 - 1
func/osal.sh

@@ -66,7 +66,7 @@ osal_kv_write() {
 osal_kv_read() {
 osal_kv_read() {
     kv_keyname=$(echo "$2" | sed_escape)
     kv_keyname=$(echo "$2" | sed_escape)
     if [ -f "$1" ]; then
     if [ -f "$1" ]; then
-        retval=$(grep "^$kv_keyname\s*=" "$1" | sed "s/^$kv_keyname\s*=\s*//" | tail -1)
+        retval=$(grep "^$kv_keyname\s*=" "$1" | sed "s/^$kv_keyname\s*=\s*//" | tail -1 | sed "s/^\([\"']\)\(.*\)\1\$/\2/g")
         if [ "$retval" ]; then
         if [ "$retval" ]; then
             echo $retval
             echo $retval
         else
         else