Home Man
Today's Posts

This forum is closed for new posts. Please post beginner questions to learn unix and learn linux in this forum UNIX for Beginners Questions & Answers

MAN command for various shells


Thread Tools Search this Thread
# 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.
The Following User Says Thank You to blackrageous For This Useful Post:
rdogadin (10-30-2013)
# 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.
The Following User Says Thank You to verdepollo For This Useful Post:
rdogadin (10-30-2013)
# 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.

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
man command output to a txt file hariniiyer300 Homework & Coursework Questions 8 06-18-2012 03:17 AM
Man command mayur_verma Shell Programming and Scripting 1 10-14-2010 04:31 PM
Differences in BASH and ASH shells regarding if command? Bashingaway UNIX for Dummies Questions & Answers 6 09-13-2010 05:33 PM
Difference in command syntax different shells hobiwhenuknowme UNIX for Dummies Questions & Answers 2 08-15-2010 04:44 PM
man command linux.user Linux 5 04-08-2010 09:52 PM
Creating a Man page for a command raghu.amilineni Solaris 2 12-21-2008 04:02 PM
man pages of any command from a c program in unix spanduu Programming 2 07-04-2006 01:58 PM
Spawning new shells from the command line in OpenStep 4.2 Rocketman8541 Shell Programming and Scripting 3 09-13-2004 10:12 AM
Man command shipoffools UNIX for Dummies Questions & Answers 5 10-16-2001 01:04 PM

All times are GMT -4. The time now is 05:11 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
Show Password