1
I have a code that I created, and I need it to create a.txt file after the execution that I sent, but it is not doing. Follow code to better understand, I appreciate the help.
#!/usr/bin/env bash
declare -a vetor_arquivos #Declara vetor dos arquivos
grep -R package* ./Javas *.java > teste.txt #gera um arquivo com todos os arquivos encontrados
mapfile vetor_arquivos < ./teste.txt #recupera arquivo mapiando para um vetor
for i in "${vetor_arquivos[@]}"; do #Percorre o vetor
echo $i #printa arquivo encontrando
done
echo "FIM"
It is printing on the terminal screen but does not create the file.
Thanks, it worked.
– Igor Pompeo