man command output to a txt file

 
Thread Tools Search this Thread
Homework and Emergencies Homework & Coursework Questions man command output to a txt file
# 1  
Old 06-17-2012
man command output to a txt file

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

1. The problem statement, all variables and given/known data:

I am trying to outut the man command output into a text file which will help me for future reference.

2. Relevant commands, code, scripts, algorithms:

man, cat


3. The attempts at a solution (include all code and scripts):

man ls|cat >>ls.txt

4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):

Self Learning. IT Professional.

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
# 2  
Old 06-17-2012
Code:
man ls -P /bin/cat > ls.txt

# 3  
Old 06-17-2012
Thank you for the reply.. I still get some special characters and it is not in readable format in txt files. How to remove it?
# 4  
Old 06-17-2012
Try:
Code:
man ls | col -b > ls.txt

This User Gave Thanks to bartus11 For This Post:
# 5  
Old 06-18-2012
Am using bash sh. Am running cygwin tool in windows to practice unix.

Here is the output:
Code:
-bash: col: command not found
Error executing formatting or display command.
System command (cd "/usr/share/man" && (echo ".pl 11i";  /usr/bin/gunzip -c '/usr/share/man/man1/ls.1.gz') | /usr/bin/tbl |  /usr/bin/nroff -c -mandoc 2>/dev/null | /usr/bin/less -isrR) exited  with status 36096.
No manual entry for ls

---------- Post updated 06-18-12 at 01:34 AM ---------- Previous update was 06-17-12 at 11:42 AM ----------

Any other commands people?

Last edited by Scrutinizer; 06-18-2012 at 04:24 AM.. Reason: code tags
# 6  
Old 06-18-2012
what is your OS ?

Code:
 
man ls > ls.txt

# 7  
Old 06-18-2012
OS is windows. I use Cygwin ( A unix terminal for windows) to practice Unix.

When i try this, I get the txt file with some unreadable characters. And I just want to organize the output to a proper format, so that I can either read it or print it in a paper to use it as a reference manual.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Copy data to CSV file from txt output

Hi Everyone , Below is output from a TL1 , I want just the NE Name: and beside that the Temperature and the voltages in a csv file , Is this possible? > act-user:AB1S2a:ArshadFO:493::**********; AB1S2a 2016-02-07 10:13:24 M 493 COMPLD "ArshadFO:2016-02-07 10-04-55,0" ;... (11 Replies)
Discussion started by: adgjmpt
11 Replies

2. Shell Programming and Scripting

Desired output.txt for reading txt file using awk?

Dear all, I have a huge txt file (DATA.txt) with the following content . From this txt file, I want the following output using some shell script. Any help is greatly appreciated. Greetings, emily DATA.txt (snippet of the huge text file) 407202849... (2 Replies)
Discussion started by: emily
2 Replies

3. Shell Programming and Scripting

Need to convert output.txt into html file

I have output.txt file generated through shell scripts which need convert in tabular format using html can you please help me output.txt Token State Date1 Date2 Description Name 34567 open 27/06/13 28/06/13 ... (5 Replies)
Discussion started by: vijay_rajni
5 Replies

4. Shell Programming and Scripting

Store output of DB Cursor to a txt file

I am writing a cursor to select values from 3 tables. I want to store these values in a txt file which I will be sending via ftp. I am able to store the results of simple select queries to the txt file. but I am not sure how to store the values when using a cursor. I have given the sql query below.... (1 Reply)
Discussion started by: naveensraj
1 Replies

5. Shell Programming and Scripting

How to store the sql query output into txt file?

Hi I want ot save SQL query result in one txt file. for that i have written one code line sqlplus -s $dbstring @/usr/local/bin/sched/nightly_Cronjob/exec_123.sql >> /usr/local/bin/sched/nightly_Cronjob/result.txt but it is not working . database : Oracle so please advice me how can i... (7 Replies)
Discussion started by: Himanshu_soni
7 Replies

6. Shell Programming and Scripting

To log binary file output to a txt file

Hi, I wrote a small script whose function is to execute the postemsg provided if the threshold breaches. I want to log this postemsg messages to a log file. But I am not able to do. Can someone throw some light on how to log the output of this. I am pasting a snippet of that code. ... (2 Replies)
Discussion started by: dbashyam
2 Replies

7. Shell Programming and Scripting

command to list .txt and .TXT file

Hi expersts, in my directory i have *.txt and *.TXT and *.TXT.log, *.txt.log I want list only .txt and .TXT files in one command... how to ?? //purple (1 Reply)
Discussion started by: thepurple
1 Replies

8. Shell Programming and Scripting

Input file redirect in output path and want name as inputfilename_new.txt

not required this time (6 Replies)
Discussion started by: Sandeep_Malik
6 Replies

9. AIX

Man command doesn't display any output amonst other problems

hi all, Newbie to Unix and AIX. So my apologies if this is in the wrong place, etc. Working on box - uname# uname -a AIX appt 3 5 00C08AAF4C00 when i type man (some valid command) it just returns me to the # prompt. Its running on the KSH shell. man was working but i was trying... (6 Replies)
Discussion started by: djdavies
6 Replies

10. UNIX for Dummies Questions & Answers

Man command doesn't display any output amonst other problems :-)

hi all, Newbie to Unix and AIX. So my apologies if this is in the wrong place, etc. Working on box - uname# uname -a AIX appt 3 5 00C08AAF4C00 when i type man (some valid command) it just returns me to the # prompt. Its running on the KSH shell. man was working but i was trying... (14 Replies)
Discussion started by: djdavies
14 Replies
Login or Register to Ask a Question