Skip to content
Snippets Groups Projects
Commit fa43b178 authored by Pedro Folloni Pesserl's avatar Pedro Folloni Pesserl
Browse files

finish part 2

parent 352636f3
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -16,6 +16,8 @@ if [ ! -d $FONTE ]; then
exit 1
fi
FONTE=$(realpath $FONTE)
if [ ! -d $DESTINO ]; then
mkdir $DESTINO
fi
......
......@@ -5,7 +5,7 @@ if [ $# -ne 2 ]; then
exit 1
fi
testa_se_diretorio() {
testa_diretorio() {
if [ ! -d $1 ]; then
>&2 echo "Erro: $1 não é um diretório."
exit 1
......@@ -15,5 +15,17 @@ testa_se_diretorio() {
DCSV=$1
DSIN=$2
testa_se_diretorio $DCSV
testa_se_diretorio $DSIN
testa_diretorio $DCSV
DCSV=$(realpath $DCSV)
testa_diretorio $DSIN
DSIN=$(realpath $DSIN)
cd $DSIN
for FATOR in *; do
CONT=$(grep -iwF -f $FATOR $DCSV/* | wc -l)
echo "${FATOR%.*}:$CONT"
done
cd - > /dev/null
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment