LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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


Reply
  Search this Thread
Old 07-30-2003, 10:14 AM   #1
spyghost
Member
 
Registered: Jun 2003
Distribution: Redhat
Posts: 245

Rep: Reputation: 30
how to produce a text file from man w/o formatting?


hi,

i would like to produce a text file from a man page such that text wouldn't be formatted. what i did was this...

$ man smb.conf >texfile.txt

the text file was produced, but there are some "formatting" included. when editors such as vi, kedit, and the like are used to view the text file, one can see some "garbage" before letters that need formatting. from what i observed, only "cat" can view such files properly.

what i would like to know is how i can remove those automatically. is there a way to do this?

reason? i would like to send some man pages to a user who uses only windows os...
 
Old 07-30-2003, 01:13 PM   #2
lfur
Member
 
Registered: Jul 2003
Location: Slovenia
Distribution: Slackware & FreeBSD
Posts: 209

Rep: Reputation: 30
You can use:
man smb.conf | col -b > smb.conf.txt

This is also shown at the bottom of the man page for man:
man man

About that garbage ... usually ^H
You can use:
tr -d '^H' <inputfile> outpufile

^H can be inserted by holding Ctrl and typing v and h.

Enjoy

Last edited by lfur; 07-30-2003 at 01:15 PM.
 
Old 07-30-2003, 07:05 PM   #3
spyghost
Member
 
Registered: Jun 2003
Distribution: Redhat
Posts: 245

Original Poster
Rep: Reputation: 30
thanks a lot... problem is solved
 
  


Reply


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
Can't get echo to produce two lines of text sknarf Linux - Software 1 06-21-2004 12:48 PM
man pages in text file serji Linux - Newbie 6 10-20-2003 04:59 PM
man pages in text file serji Linux - Software 6 10-20-2003 04:35 PM
Man Page Formatting nxny Linux - General 7 01-06-2003 08:59 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 07:02 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