gho*_*g74 38
只需使用awk
awk 'FNR==1{print ""}1' *.txt
Run Code Online (Sandbox Code Playgroud)
Suc*_*uch 23
如果你有paste支持它,
paste --delimiter=\\n --serial *.txt
Run Code Online (Sandbox Code Playgroud)
做得非常好
R S*_*hko 17
您可以使用for循环遍历每个文件:
for filename in *.txt; do
# each time through the loop, ${filename} will hold the name
# of the next *.txt file. You can then arbitrarily process
# each file
cat "${filename}"
echo
# You can add redirection after the done (which ends the
# for loop). Any output within the for loop will be sent to
# the redirection specified here
done > output_file
Run Code Online (Sandbox Code Playgroud)
我假设你想在文件之间换行.
for file in *.txt
do
cat "$file" >> result
echo >> result
done
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
28283 次 |
| 最近记录: |