Sunday, May 5, 2024
10
rated 0 times [  10] [ 0]  / answers: 1 / hits: 1295  / 3 Years ago, sat, june 26, 2021, 12:33:09

This is what I type and the output I get:


$ cat helloworld.txt

Hello World!
I'm Kanladaporn Sirithatthamrong
6480952

But this is what I want an output to be:


Hello World!

I'm Kanladaporn Sirithatthamrong

6480952

What should I do?
Any suggestions please?


More From » command-line

 Answers
6

Use pr:


$ pr -Td helloworld.txt
Hello World!

I'm Kanladaporn Sirithatthamrong

6480952

$

From man pr:


   -d, --double-space
double space the output

-T, --omit-pagination
omit page headers and trailers, eliminate any pagination by form feeds set in input files

[#217] Sunday, June 27, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
hergy

Total Points: 64
Total Questions: 115
Total Answers: 109

Location: Saint Helena
Member since Tue, Nov 3, 2020
4 Years ago
hergy questions
Tue, Aug 31, 21, 08:36, 3 Years ago
Thu, Mar 31, 22, 11:18, 2 Years ago
;