man format file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting man format file
# 1  
Old 09-26-2004
man format file

hello
How can i make a man file from a plain text file, what command should use?
thanks
# 2  
Old 09-27-2004
man pages are formatted using troff/groff. You should do a man troff and a man groff.

You can try this agains your txt file, to view it.
groff -Tascii -mm your_file | less

Look at the source from any of the man pages installed.

After formatting the text you can view it in many ways, such as issuing the command against your txt file
nroff -man your_file | less
and even
groff -Tascii -man your_file |less

You can also create various output from your formatted document.
Such as txt, ps, dvi.

groff -Tascii -mm your_file > newfile.txt
groff -Tps -mm your_file > newfile.ps
groff -Tdvi -mm your_file > newfile.dvi

a quick idea you can use to format your text to work with groff.

Quote:
.TH Addressbook 2 Office 9/27/2004 Linux
.SH Addressbook
Something about the address book written here!
.SH Synopsis
.PP
.SH DESCRIPTION
.PP
How to use the address book
.PP
.SH FILES
/usr/local/bin
.PP
$HOME/.contacts
.SH BUGS
None filed
you can then process this, saving the file to address.2 and issuing;
groff -Tascii -man address.2 | less

Last edited by locustfurnace; 09-27-2004 at 10:53 PM..
# 3  
Old 09-28-2004
let's say, I created a script file named: commandlog

can i use : man commandlog
to show some tips helping the users?
# 4  
Old 10-07-2004
Aha... you are absolutly right...
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help to format one txt file to required format

Hello Everyone, I have one source file which is genarated by SAP in different format(Which I've never seen). I need to convert that file to required format and I need to read this target file from Datastage to use this in my Jobs. So I do not have any other options except to use Unix script to... (4 Replies)
Discussion started by: Prathyu
4 Replies

2. Shell Programming and Scripting

Converting windows format file to unix format using script

Hi, I am having couple of files which i used to copy from windows to Linux, so now in case of text files (CTRL^M) appears at end of line. I know i can convert this windows format file to unix format file by running dos2unix. My requirement here is that i want to do it automatically using a... (5 Replies)
Discussion started by: sarbjit
5 Replies

3. Solaris

Typo in man file??

Hi is it me or is there a typo in the Sun Solaris man page for ps. I thought the option for listing a process by PID was just -p but on the clearcase server at work it reads: - -ps proclist Lists only process data whose process ID numbers are given in proclist.... (5 Replies)
Discussion started by: steadyonabix
5 Replies

4. Shell Programming and Scripting

Convert UNIX file format to PC format

Hi All, Is there any way to convert a file which is in UNIX format to a PC format.... Flip command can be used , apart form this command can we have any other way.... like usinf "awk" etc ..... main purpose of not using flip is that my Kshell doesnot support this comamnd.... (2 Replies)
Discussion started by: Samtel
2 Replies

5. UNIX for Dummies Questions & Answers

Convert UNIX file format to PC format

Hi All, Is there any way to convert a file which is in UNIX format to a PC format.... Flip command can be used , apart form this command can we have any other way.... like usinf "awk" etc ..... main purpose of not using flip is that my Kshell doesnot support this comamnd.... (1 Reply)
Discussion started by: Samtel
1 Replies

6. UNIX for Dummies Questions & Answers

To convert multi format file to a readable ascii format

Hi I have a file which has ascii , binary, binary decimal coded,decimal & hexadecimal data with lot of special characters (like öƒ.ƒ.„İİ¡Š·œƒ.„İİ¡Š· ) in it. I want to standardize the file into ASCII format & later use that as source . Can any one suggest a way a logic to convert such... (5 Replies)
Discussion started by: gaur.deepti
5 Replies

7. UNIX for Dummies Questions & Answers

Convert UTF8 Format file to ANSI format

:confused: Hi i am trying to convert a file which is in UTF8 format to ANSI format i tried to use the function ICONV but it is throwing error Function i used it as $ iconv -f UTF8 -t ANSI filename Error iam getting is NOT Supported UTF8 to ANSI please some help me out on... (9 Replies)
Discussion started by: rajreddy
9 Replies

8. UNIX for Advanced & Expert Users

Convert UTF8 Format file to ANSI format

:) Hi i am trying to convert a file which is in UTF8 format to ANSI format i tried to use the function ICONV but it is throwing error Function i used it as $ iconv -f UTF8 -t ANSI filename Error iam getting is NOT Supported UTF8 to ANSI please some help me out on this.........Let me... (1 Reply)
Discussion started by: rajreddy
1 Replies
Login or Register to Ask a Question