Created
August 27, 2025 16:55
-
-
Save dmuth/885de08ec677a8e4a136a70142421913 to your computer and use it in GitHub Desktop.
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 | |
| # | |
| # Dump our files to the screen for copying into the Clipboard and getting into ChatGPT | |
| # | |
| # Errors are fatal | |
| set -e | |
| if test ! "$1" | |
| then | |
| echo "! " | |
| echo "! Syntax: $0 (1 or more filenames or patterns)" | |
| echo "! " | |
| exit | |
| fi | |
| BEENHERE="" | |
| for FILE in $(find "$@" 2>/dev/null || true) | |
| do | |
| if test -f "${FILE}" | |
| then | |
| BEENHERE=1 | |
| echo "===== ${FILE} =====" | |
| cat "$FILE" | |
| fi | |
| done | |
| if test ! "${BEENHERE}" | |
| then | |
| echo "!" | |
| echo "! No files were found with these names: $@" | |
| echo "!" | |
| exit 1 | |
| fi | |
| echo "=====" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment