LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 10-18-2003, 08:36 PM   #1
serji
LQ Newbie
 
Registered: Jun 2003
Location: spain
Distribution: debian 3.0, FreeBSD 4.7
Posts: 27

Rep: Reputation: 15
man pages in text file


hello friends!

i need to copy the output of several man pages in a text file.
i know "man ls > /tmp/ls" is a wrong idea because the output of "man ls" is not in text format.
i ve tried to do "script /tmp/file" and then "man ls" but the result is the same.
i ve tried to do "cat /tmp/file | nano textfile" but nano does not support this.

what must i do???

thanks
 
Old 10-18-2003, 09:08 PM   #2
speter
Member
 
Registered: Sep 2003
Location: Edison, NJ
Distribution: Fedora, Mac OS X
Posts: 313

Rep: Reputation: 30
Man pages are simply groff, so try

groff -Tascii -man <manpagefile> > textfile

-Tascii forces ascii output, and -man uses the man page macro set.

Steve
 
Old 10-18-2003, 09:15 PM   #3
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 69
Re: man pages in text file

Quote:
Originally posted by serji
hello friends!

i need to copy the output of several man pages in a text file.
i know "man ls > /tmp/ls" is a wrong idea because the output of "man ls" is not in text format.
i ve tried to do "script /tmp/file" and then "man ls" but the result is the same.
i ve tried to do "cat /tmp/file | nano textfile" but nano does not support this.

what must i do???

thanks
You can get the man pages you want right here at this site in html then just cut'n'paste.
 
Old 10-19-2003, 06:31 PM   #4
serji
LQ Newbie
 
Registered: Jun 2003
Location: spain
Distribution: debian 3.0, FreeBSD 4.7
Posts: 27

Original Poster
Rep: Reputation: 15
OK, thanks

groff -Tascii -man <manpagefile> > textfile does not work. If i do:
groff -Tascii -man ls > textfile
it says me "troff:fatal error:cantīt open 'ls' "

if i do "man <manpagefile> > file" and then "groff -a file > anotherfile" the result is a man page in txt format but with an error: there are duplicated letters in several words like "SSIINNOOPPSSIISS"

The man pages in html is useful, but i prefer the man pages in spanish language

thank you very much! bye

Last edited by serji; 10-19-2003 at 06:33 PM.
 
Old 10-19-2003, 09:11 PM   #5
speter
Member
 
Registered: Sep 2003
Location: Edison, NJ
Distribution: Fedora, Mac OS X
Posts: 313

Rep: Reputation: 30
Two things: 1) You are typing in the actual name of the file where I put <manpagefile>, right? (For example ls isn't the actual name of the manpage file.) The duplicate letters you are seeing is the way the man macro set handles making a font bold, so try
groff -man file > anotherfile for your second step. As for having them in Spanish, the original file needs to be in Spanish. Lo siento, but creating html or txt will not make them Spanish.

2) Don't post the same question in two different forums.

Steve
 
Old 10-20-2003, 04:34 PM   #6
serji
LQ Newbie
 
Registered: Jun 2003
Location: spain
Distribution: debian 3.0, FreeBSD 4.7
Posts: 27

Original Poster
Rep: Reputation: 15
Oh, sorry

Do you want to say this?:

#man <manpage> > file
#groff -Tascii -man file > anotherfile

this does not work but thank you.
 
Old 10-20-2003, 04:59 PM   #7
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,568

Rep: Reputation: 164Reputation: 164
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php

Now there are two threads, the second one is http://www.linuxquestions.org/questi...readid=105530.

Please choose one forum and post only one thread next time.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Huge text in man pages and help gekko9 Linux - Newbie 3 05-01-2004 01:01 PM
man pages in text file serji Linux - Software 6 10-20-2003 04:35 PM
converting man pages to windows-readable text peok Linux - General 4 10-12-2003 03:52 PM
how to produce a text file from man w/o formatting? spyghost Linux - Newbie 2 07-30-2003 07:05 PM
MAN Pages..can I export to a text file? phil1076 Linux - General 4 10-29-2001 09:11 AM


All times are GMT -5. The time now is 10:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration