With a oneliner:
$ perl -i -ple '$_.="\n" if $. % 4 == 0; close ARGV if eof' -- FILES
Documentation: Command-line switches in perlrun, $. for the current line number, eof in regards to resetting $., and Multiplicative Operators for the modulo operator.
In reply to Re: put a newline character after every four lines in a file
by haukex
in thread put a newline character after every four lines in a file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |