From 9e164997a61f962a9c84b86d084e2404d245ae8d Mon Sep 17 00:00:00 2001 From: Ricardo Markiewicz Date: Sun, 24 Oct 2004 19:03:46 +0000 Subject: [PATCH 1/1] filtro en la busqueda los que no estaban A --- inst/aficonf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/inst/aficonf b/inst/aficonf index ca2e3b0..2aee083 100755 --- a/inst/aficonf +++ b/inst/aficonf @@ -26,10 +26,13 @@ poner_estado_umbral () { ID=$1 ESTADO=$2 + FECHA=`date +"%Y%m%d"` + HORA=`date +"%H%M%S"` + if [ "$ESTADO" != "A" ] && [ "$ESTADO" != "I" ] ; then return 1 fi - SALIDA=`sed "s/^$ID\(;[^;]*;[^;]*;[^;]*;\)[^;]*\(;[^;]*;[^;]*;[^;]*\)$/$ID\1I\2/" "$BASE_DIR/umbrales.param"` + SALIDA=`sed "s/^$ID\(;[^;]*;[^;]*;[^;]*;\)[^;]*\(;[^;]*;[^;]*;[^;]*\)$/$ID\1I;$USER;$FECHA;$HORA/" "$BASE_DIR/umbrales.param"` echo "$SALIDA" > "$BASE_DIR/umbrales.param" } @@ -130,7 +133,7 @@ case_buscar () { fi done - DATOS=`cat "$BASE_DIR/umbrales.param" | grep "[0-9]*;$LINEA"` + DATOS=`cat "$BASE_DIR/umbrales.param" | grep "[0-9]*;$LINEA;[A-Z]*;[E,S];A"` printf "%3s %2s %1s %1s %10s%8s %6s\n" "ID" "Ciudad" "Tipo" "Estado" "Usuario" "Fecha" "Hora" OPCIONES="-1" -- 2.43.0