Exiting a manual


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Exiting a manual
# 1  
Old 01-28-2009
Exiting a manual

I'm sure it's really easy, but I have searched on Google and on the forums and haven't found anything.

For instance, if I open the grep manual (man grep), I can't close it.
I've tried ctrl+c, ctrl+x, scrolling to the bottom of the manual.
How can I exit the manual without closing the shell?

edit: Thank you Tytalus.

Last edited by dennis89; 01-28-2009 at 11:07 AM..
# 2  
Old 01-28-2009
you can quit the man pages at any time by pressing q

try h to see the full help.

the man pages are basically shunted through "more" so same syntax/command set as there.

HTH
# 3  
Old 01-28-2009
FWIW -- I like to pump my man pages into vi before reading them because oftentimes
they contain code snippets and structs and what-not that I want to immediately use.
vi lets me grab specific lines and store them very nicely.

so my 'man' is actually 'mon' ( kinda Jamaican )

mon:

man $* | col -b > /tmp/man.$LOGNAME
vi /tmp/man.$LOGNAME
/bin/rm /tmp/man.$LOGNAME

or something like that...
Actually, there's a lot more to it... but that's essentially it.
# 4  
Old 01-28-2009
Quote:
Originally Posted by quirkasaurus
FWIW -- I like to pump my man pages into vi before reading them because oftentimes
they contain code snippets and structs and what-not that I want to immediately use.
vi lets me grab specific lines and store them very nicely.

Why do you need to read it in vi to do that? Simply copy and paste from the output of man.
# 5  
Old 01-28-2009
Quote:
Originally Posted by cfajohnson
Why do you need to read it in vi to do that? Simply copy and paste from the output of man.
you're right. you don't. it's just that I use vi 90% of my day...
it's just easy to search.... scroll backwards, forwards....
use the same hot-keys in "man" as I do everywhere else.
rather than switching to "more" mode.

Plus - - - on my machine - - - man uses formatting characters,
underlines, and overstrikes, ( ie. ^Hi^Hi^Hi^Hi ) where I've had problems cutting and pasting because you get all those control characters also.

Using col -b and vi eliminates that concern.
# 6  
Old 01-28-2009
set your 'PAGER' to 'less' - this is more convenient.
<depending on your shell>
Code:
export PAGER=less

# 7  
Old 01-28-2009
Quote:
Originally Posted by quirkasaurus
Plus - - - on my machine - - - man uses formatting characters,
underlines, and overstrikes, ( ie. ^Hi^Hi^Hi^Hi ) where I've had problems cutting and pasting because you get all those control characters also.

Using col -b and vi eliminates that concern.

I've never know cutting (highlighting with the mouse) to capture control characters.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

For loop exiting

Hi , I am processing some files using below shell script the problem for loop exit after processing some files even though it exist.After modifying file.txt and rerunning the script and its running .Any Advise for i in `cat /xx/file.txt |tr -s "," '\n' ` ; do echo $i... (3 Replies)
Discussion started by: mohan705
3 Replies

2. Shell Programming and Scripting

While Loop Exiting

We are trying to design a flow so that an ETL job shouldn't start until the previous job completes. The script we have written is while ; do sleep 2; done The loop however exits even when the process is actually running. Why could this be happening? (12 Replies)
Discussion started by: jerome_rajan
12 Replies

3. Solaris

Exiting signal 6

Hello all, I have a problem when installing Solaris 10 on Enterprise 450. I booted from dvd, then the installation was started. The error appeared after determining the installation method, F2-Standard, F?-Flash...... The error was Exiting signal 6. Please, need help. Thank you (4 Replies)
Discussion started by: Hardono
4 Replies

4. Shell Programming and Scripting

exiting from script

Hi, I am trying to exit the script from a function. I was in assumption that if we use exit ( inside or outside the function) it will exit from the script. alternatively, return will exit from that particular function. but in my case, exit is exiting from the function and not the script.... (8 Replies)
Discussion started by: shellwell
8 Replies

5. Shell Programming and Scripting

Exiting a script

I have a script abc.sh. Its contents are as follows: (7 Replies)
Discussion started by: lassimanji
7 Replies

6. Shell Programming and Scripting

No Manual Entry

Hi, While executing the following command i am getting output as command not found. iostat output: command not found Also, man iostat is displaying "NO Manual Entry" Why is it so? (5 Replies)
Discussion started by: salil2012
5 Replies

7. Shell Programming and Scripting

Need help with a manual task

I have an ASCII file that I receive on a monthly bases that is fixed length. I break the file into separate files based on a 5 character numerical sequence. I have 20 different sequences I have to find. the input file looks something like this xy-ins 2008yuthnrlsinrthsntwilgrha33260001... (4 Replies)
Discussion started by: jcalisi
4 Replies

8. Shell Programming and Scripting

NDM manual

Hi, Can any of you tell me how to get this ndm manual stuff? I need it to know specific error ids and descriptions Thanks, Vinodhini (1 Reply)
Discussion started by: vinodhini4
1 Replies

9. UNIX for Dummies Questions & Answers

No manual entry for

I don't seem to be able to get man pages up for any command. When I try the "No manual entry for..." message is displayed. When checking my $MANPATH variable I get the following /opt/SUNconn/man: However, when I check this directory it doesn't exist. Searching for any man directories results... (3 Replies)
Discussion started by: FattyLumpkin
3 Replies

10. Programming

exiting in c

how can i exit in a c program i have tried system ("exit"); but this doesnt seem to work just wondered if you could help. (3 Replies)
Discussion started by: ruffenator
3 Replies
Login or Register to Ask a Question