From: Ricardo Markiewicz Date: Sun, 24 Oct 2004 18:35:16 +0000 (+0000) Subject: fixes para escapear simbolos y que no fallen greps X-Git-Tag: svn_import~71 X-Git-Url: https://git.llucax.com/z.facultad/75.08/llamadas.git/commitdiff_plain/99b3058f5ecde7a281091bdd7d0deb04e026d0e4 fixes para escapear simbolos y que no fallen greps --- diff --git a/inst/util.sh b/inst/util.sh index d4a5dcf..136ab7c 100755 --- a/inst/util.sh +++ b/inst/util.sh @@ -37,6 +37,10 @@ preguntar () { OPCIONES=$2 while [ true ] ; do read -p "$PREGUNTA [$OPCIONES]: " RTA + + # Escapeo el caracter '-' por '\-' + RTA=$(echo $RTA | sed "s/\-/\\\-/") + IS_OK=`echo "$OPCIONES" | grep "$RTA"` if [ ! -z "$IS_OK" ] && [ ! -z "$RTA" ] ; then eval "$3=$RTA"