Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Append newline to many files
- X-seq: zsh-users 28124
- From: Dominik Vogt <dominik.vogt@xxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Append newline to many files
- Date: Sun, 25 Sep 2022 14:19:50 +0100
- Archived-at: <https://zsh.org/users/28124>
- List-id: <zsh-users.zsh.org>
- Mail-followup-to: Zsh Users <zsh-users@xxxxxxx>
- Reply-to: dominik.vogt@xxxxxx
Assume there are thousands of text files that are not terminated
with a newline. I want to concatenate them all, but add the
missing newline between files.
This works but takes ten times as much time as "cat foo.*".
for i in foo.*; do cat "$i"; echo; done > out
I can't really think of a fast yet simple solution.
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
Messages sorted by:
Reverse Date,
Date,
Thread,
Author