Created
April 26, 2023 15:46
-
-
Save krasnobaev/96e7f9639b0f6b7a93a4da2d9360b2b8 to your computer and use it in GitHub Desktop.
generate source code listing
This file contains 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/sh | |
# usage: scriptname file1 file2 ... | |
# find . -name '*' | sort | xargs ./list.sh {} \; > ../listing.txt | |
for file in "$@" | |
do | |
[ -f "$file" ] || continue | |
set -- `wc "$file"` | |
echo "${file}: lines $1 words $2 bytes $3" | |
cat -b -t "$file" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment