From e43ede9fbaa29a7efd3d4fc3c9c54d69b149494f Mon Sep 17 00:00:00 2001 From: Pedro Folloni Pesserl <fpesserl7@gmail.com> Date: Tue, 21 Feb 2023 21:25:58 -0300 Subject: [PATCH] fix file scope for scripts --- tshell/tshell_p1.sh | 2 +- tshell/tshell_p2.sh | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tshell/tshell_p1.sh b/tshell/tshell_p1.sh index 54e3a16..7b3e448 100755 --- a/tshell/tshell_p1.sh +++ b/tshell/tshell_p1.sh @@ -25,7 +25,7 @@ fi DESTINO=$(realpath $DESTINO) cd $FONTE -for ARQ in *; do +for ARQ in *.csv; do awk '(NR>1)' $ARQ | grep -iF "$T1" | grep -iF "$T2" | grep -iF "$T3" > $DESTINO/$ARQ done cd - > /dev/null diff --git a/tshell/tshell_p2.sh b/tshell/tshell_p2.sh index e7cdd2e..715f7a6 100755 --- a/tshell/tshell_p2.sh +++ b/tshell/tshell_p2.sh @@ -23,9 +23,7 @@ DSIN=$(realpath $DSIN) cd $DSIN for FATOR in *; do - - CONT=$(grep -iwF -f $FATOR $DCSV/* | wc -l) - + CONT=$(grep -iwF -f $FATOR $DCSV/*.csv | wc -l) echo "${FATOR%.*}:$CONT" done cd - > /dev/null -- GitLab