Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

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


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, 12:13 PM   #2
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.


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

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


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 11:48 AM
man pages in text file serji Linux - Newbie 6 10-20-2003 03:59 PM
man pages in text file serji Linux - Software 6 10-20-2003 03:35 PM
Man Page Formatting nxny Linux - General 7 01-06-2003 07:59 PM
MAN Pages..can I export to a text file? phil1076 Linux - General 4 10-29-2001 08:11 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:29 PM.

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