Skip to content

Instantly share code, notes, and snippets.

View mickaelxd's full-sized avatar

Mickael Rocha mickaelxd

  • Blumenau, Brazil
View GitHub Profile
@mickaelxd
mickaelxd / get_files.sh
Created April 16, 2025 19:12
Script que lê arquivos de texto do projeto, joga tudo no `output.txt` junto com um pedido final pra refatorar e devolver um arquivo .sh
#!/bin/bash
echo "" > output.txt
process_folder() {
local folder=$1
find "$folder" -type f | while read file; do
# Verifica se é um arquivo de texto (text/* no mime-type)
if file --mime-type "$file" | grep -q '^.*: text/'; then
echo "File: $file" >> output.txt
cat "$file" >> output.txt