Ed James
Ed James

Reputation: 10607

Double spacing lines in a Linux terminal

Does anyone know if it's possible to force terminal to append a \n to every line it prints (or something similar)?

I'm trying to debug some insane code which gives me errors the full width of my (24") screen and three lines long, so I'd appreciate not having to copy things into gedit and manually spacing them out every time I press make.

Cheers, Ed

N.B. I'm using "make 2>&1 | more" so I can't just do "| sed G"

(EDITED for clarity)

Upvotes: 0

Views: 2264

Answers (2)

Jordan Parmer
Jordan Parmer

Reputation: 37174

If you want to change this on the entire terminal, you append '\n' to the PS1 variable in your .bash_rc file.

For instance:

PS1 = '\n> '

**EDIT:**This will put newlines between commands you enter on the command prompt but won't affect the output of applications.

Upvotes: 0

sykloid
sykloid

Reputation: 101206

If you just want to double space the output of a command or something, you can pipe it through sed to double space:

$> your_command | sed G

Upvotes: 5

Related Questions