Last active
April 17, 2025 16:30
-
-
Save Elijas/57597b80cafbb4b6d1aede8269db2a4d to your computer and use it in GitHub Desktop.
copy_file_content.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while IFS= read -r -d '' file; do | |
full_path=$(realpath "$file") | |
echo "==============================" | |
echo "START OF FILE: $full_path" | |
echo "==============================" | |
echo | |
cat "$full_path" 2>/dev/null | |
echo | |
echo "==============================" | |
echo "END OF FILE: $full_path" | |
echo "==============================" | |
echo | |
done < <(find . -type f -not -empty -not -name '*.ipynb' -not -path '*/\.*' -not -path '*LICENSE*' -not -path '*/__pycache__/*' -not -path '*/baml_src/*' -not -path '*/generated_code/*' -not -path '*/data/*' -not -path '*/.cache/*' -not -name '*.lock' -not -name 'lcov.info' -not -name '__init__.py' -print0) | pbcopy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
bash -c "$(curl -fsSL https://gist.githubusercontent.com/Elijas/57597b80cafbb4b6d1aede8269db2a4d/raw/677dfbffb72e810c63278824dd2d36e5c710e2b9/copy_file_content.sh)"