MAN command for various shells

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers MAN command for various shells
# 1  
Old 10-30-2013
MAN command for various shells

Whenever I run manual page on a command I get information about arguments, syntax and so on. However, I wounder if that information is valid only for a certain shell and if yes, then for which one?
In other words, would I have different man outputs for csh, ksh, bash and others?

# 2  
Old 10-30-2013
Man pages in general are not tied to a particular shell. You should defer to the set of man pages for your particular version of unix. Like aix, solaris, etc.
This User Gave Thanks to blackrageous For This Post:
# 3  
Old 10-30-2013
man pages are independent from the shell so you'll see the same info regardless of the one you use (assuming you have the same version of the manuals, of course). Some distributions pack all the man pages together into a single file (E.g.: man-pages-3.1.0.rpm)

Most times you'd want to see the man page for a particular utility (E.g: curl, ifconfig, lvm) that is not part of the shell.

Some commands are shell built-ins (Eg: cd, alias, source) so if you type man cd you'll be presented with the man page for your shell (built-ins Section).

FWIW - There used to be a book several years ago consisting of man pages *only*. Unfortunately manuals and sections change pretty quickly and I haven't seen that book anymore in the local bookstores.
This User Gave Thanks to verdepollo For This Post:
# 4  
Old 10-30-2013
Thank you for the replies. So since man pages are shell independent, does this mean that the syntax I get from running e.g.
man test

will work in any shell script if I run it on the same server?
# 5  
Old 10-30-2013
Originally Posted by rdogadin
will work in any shell script if I run it on the same server?
Yes, but...

Keep in mind that different operating systems also have different implementations for the same tools, even the simplest ones.

This is particularly noticeable when you compare GNU utilities vs -say- BSD ones.

Almost every Linux system use GNU-based tools but it you were using AIX or Solaris I wouldn't blindly trust that "test" would behave exactly the same.

So, it also depends on who wrote those tools and if they comply with the standards (if any) -- You may be using 'test' written by GNU programmers, while some other server running AIX might be using "test" written by IBM engineers exclusively for AIX.
# 6  
Old 10-30-2013
Thank you so much for the clarification
# 7  
Old 10-30-2013
The test command is somewhat special. Most modern shells also have a test builtin, i.e. [ ], and an extended test builtin, i.e. [[ ]]. You may have to read the shell manpage for your particular shell.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Using man command

hi linux expert how to use man command for get help about "extended regular expression"? many thanks samad (2 Replies)
Discussion started by: abdossamad2003
2 Replies

2. Homework & Coursework Questions

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.... (8 Replies)
Discussion started by: hariniiyer300
8 Replies

3. Shell Programming and Scripting

Man command

How to get only the options and arguments of a command excluding the descriptive help? (1 Reply)
Discussion started by: mayur_verma
1 Replies

4. UNIX for Dummies Questions & Answers

Differences in BASH and ASH shells regarding if command?

Guys I now have a script that's working in a BASH environment, however one line doesn't appear to be working on an embedded device that has a busybox therefore ASH shell. I've googled but there's very little I can find regarding the ASH shell. In BASH the following line works... if ] ;... (6 Replies)
Discussion started by: Bashingaway
6 Replies

5. UNIX for Dummies Questions & Answers

Difference in command syntax different shells

hi, i am aa unix amateur and i am using tsh, csh and bash most of the time. i have been looking over the net to find a summary of the differences in command syntax for example: in csh and tsh you do alias whatday date while in bash and ksh you do alias whatday=date i just want more... (2 Replies)
Discussion started by: hobiwhenuknowme
2 Replies

6. Linux

man command

Hey people do u know how to disable the man command in linux??? i am not able to do anythg apart from disabling the permission for /usr/bin/... i dont wanna uninstall the man / man pages also... this has been one of the toughest challenges i have come across in linux... can anybody... (5 Replies)
Discussion started by: linux.user
5 Replies

7. Solaris

Creating a Man page for a command

Hi, I would like to develop a man page as the one we usually get when we execute man <command name>. This man page will be for a samll utility that i have written. If this is not possible then what are the available possibilites for creating such help. thanks in advance. (2 Replies)
Discussion started by: raghu.amilineni
2 Replies

8. Shell Programming and Scripting

Spawning new shells from the command line in OpenStep 4.2

Hi all, Im trying to figure out what the command would be to launch terminal windows from the command line in Open Step 4.2 . (looking for something similiar like /usr/bin/xterm or /usr/bin/dtterm etc) echo $TERM = vt100 echo $SHELL = /bin/csh Im combing over alot of OpenStep 4.2 and... (3 Replies)
Discussion started by: Rocketman8541
3 Replies

9. UNIX for Dummies Questions & Answers

Man command

I know what the man command does and I know how to use it, but i am trying to find an answer to a question. When you run man on an other command it will give you the first page on your screen and then you hit the space bar and it brings up the second page. What command option would I use if I... (5 Replies)
Discussion started by: shipoffools
5 Replies
Login or Register to Ask a Question