Created
February 1, 2023 19:35
-
-
Save ncaq/0f14e2ed8f334a9df87ce6511d8cff20 to your computer and use it in GitHub Desktop.
ファイル名とファイルを連結して一つのファイルにするシェルスクリプト
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/bash | |
# tail使った方が良い。 | |
# [unix - Concatenate multiple files but include filename as section headers - Stack Overflow](https://stackoverflow.com/questions/5917413/concatenate-multiple-files-but-include-filename-as-section-headers) | |
for i in $1/* | |
do | |
echo $i | |
cat "$i" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment