Re: print N times
| Newsgroups | gmane.editors.sed.user |
|---|---|
| Message-ID | <[email protected]> |
We can simplify the sed code a bit , since the pattern space
gets loaded by input.
Note: The $N even though it looks like a valid sed syntax, but
here it is a shell variable N, storing the number of times
to print the string "abcd". N > 0
sed -ne "
:loop
G;P
s/\n/&/$N
Tloop
"
[Non-text portions of this message have been removed]