You are not logged in.

#1 2008-11-11 06:01:36

ttyX
Member
Registered: 2008-11-11
Posts: 2

Weird problem with output redirection of man pages[SOLVED]

Well the problem is whenever i redirect the output of man pages and open the output file in gedit or gvim, it appears somewhat like this
sgs7x1.png
But when I try viewing in terminal it appears fine
2eogsgi.png
so, I assume it has something todo with encoding but I can't seem to figure out how to fix it. So can anyone help me with this please?
Thanks in advance smile

Last edited by ttyX (2008-11-11 12:17:02)

Offline

#2 2008-11-11 08:36:15

syntaxerrormmm
Member
From: Italy
Registered: 2008-10-22
Posts: 80
Website

Re: Weird problem with output redirection of man pages[SOLVED]

ttyX wrote:

so, I assume it has something todo with encoding

Not sure about encoding. The problem is that the man pages are formatted text, catting them or redirecting them to file is equivalent to maintain format information in the output. The only program I know that is able to show the formatted text is less, sorry.

[Edit] It was interesting also for me, so at this FAQ I found a simple solution:

$ man bash | col -b > bash_manpage.txt

HTH.

Last edited by syntaxerrormmm (2008-11-11 08:46:12)


syntaxerrormmm - Homepage

Offline

#3 2008-11-11 12:12:20

ttyX
Member
Registered: 2008-11-11
Posts: 2

Re: Weird problem with output redirection of man pages[SOLVED]

syntaxerrormmm wrote:
ttyX wrote:

so, I assume it has something todo with encoding

Not sure about encoding. The problem is that the man pages are formatted text, catting them or redirecting them to file is equivalent to maintain format information in the output. The only program I know that is able to show the formatted text is less, sorry.

[Edit] It was interesting also for me, so at this FAQ I found a simple solution:

$ man bash | col -b > bash_manpage.txt

HTH.

Wow that really did the job thanks a lot big_smile

Offline

Board footer

Powered by FluxBB