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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-18-2003, 07:36 PM
|
#1
|
LQ Newbie
Registered: Jun 2003
Location: spain
Distribution: debian 3.0, FreeBSD 4.7
Posts: 27
Rep:
|
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
|
|
|
10-18-2003, 08:08 PM
|
#2
|
Member
Registered: Sep 2003
Location: Edison, NJ
Distribution: Fedora, Mac OS X
Posts: 313
Rep:
|
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
|
|
|
10-18-2003, 08:15 PM
|
#3
|
Senior Member
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170
|
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.
|
|
|
10-19-2003, 05:31 PM
|
#4
|
LQ Newbie
Registered: Jun 2003
Location: spain
Distribution: debian 3.0, FreeBSD 4.7
Posts: 27
Original Poster
Rep:
|
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 05:33 PM.
|
|
|
10-19-2003, 08:11 PM
|
#5
|
Member
Registered: Sep 2003
Location: Edison, NJ
Distribution: Fedora, Mac OS X
Posts: 313
Rep:
|
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
|
|
|
10-20-2003, 03:34 PM
|
#6
|
LQ Newbie
Registered: Jun 2003
Location: spain
Distribution: debian 3.0, FreeBSD 4.7
Posts: 27
Original Poster
Rep:
|
Oh, sorry
Do you want to say this?:
#man <manpage> > file
#groff -Tascii -man file > anotherfile
this does not work but thank you.
|
|
|
10-20-2003, 03:59 PM
|
#7
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696
|
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.
|
|
|
All times are GMT -5. The time now is 05:44 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|