Unix/Linux Go Back    


UNIX for Dummies Questions & Answers 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

UNIX for Dummies Questions & Answers


 
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 10-30-2013   -   Original Discussion by rdogadin
rdogadin's Unix or Linux Image
rdogadin rdogadin is offline
Registered User
 
Join Date: Oct 2013
Last Activity: 30 December 2013, 4:53 PM EST
Posts: 15
Thanks: 10
Thanked 0 Times in 0 Posts
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?

Thanks
Sponsored Links
    #2  
Old Unix and Linux 10-30-2013   -   Original Discussion by rdogadin
blackrageous's Unix or Linux Image
blackrageous blackrageous is offline
Registered User
 
Join Date: Jul 2013
Last Activity: 12 April 2017, 6:26 PM EDT
Location: Austin, Texas
Posts: 540
Thanks: 13
Thanked 111 Times in 108 Posts
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)
Sponsored Links
    #3  
Old Unix and Linux 10-30-2013   -   Original Discussion by rdogadin
verdepollo's Unix or Linux Image
verdepollo verdepollo is offline
Registered User
 
Join Date: Mar 2010
Last Activity: 18 July 2017, 2:01 PM EDT
Location: Mexico
Posts: 725
Thanks: 11
Thanked 105 Times in 102 Posts
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 Unix and Linux 10-30-2013   -   Original Discussion by rdogadin
rdogadin's Unix or Linux Image
rdogadin rdogadin is offline
Registered User
 
Join Date: Oct 2013
Last Activity: 30 December 2013, 4:53 PM EST
Posts: 15
Thanks: 10
Thanked 0 Times in 0 Posts
Thank you for the replies. So since man pages are shell independent, does this mean that the syntax I get from running e.g.
Code:
man test

will work in any shell script if I run it on the same server?
Sponsored Links
    #5  
Old Unix and Linux 10-30-2013   -   Original Discussion by rdogadin
verdepollo's Unix or Linux Image
verdepollo verdepollo is offline
Registered User
 
Join Date: Mar 2010
Last Activity: 18 July 2017, 2:01 PM EDT
Location: Mexico
Posts: 725
Thanks: 11
Thanked 105 Times in 102 Posts
Quote:
Originally Posted by rdogadin View Post
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.
Sponsored Links
    #6  
Old Unix and Linux 10-30-2013   -   Original Discussion by rdogadin
rdogadin's Unix or Linux Image
rdogadin rdogadin is offline
Registered User
 
Join Date: Oct 2013
Last Activity: 30 December 2013, 4:53 PM EST
Posts: 15
Thanks: 10
Thanked 0 Times in 0 Posts
Thank you so much for the clarification
Sponsored Links
    #7  
Old Unix and Linux 10-30-2013   -   Original Discussion by rdogadin
fpmurphy's Unix or Linux Image
fpmurphy fpmurphy is offline
Registered User
 
Join Date: Dec 2003
Last Activity: 12 June 2016, 11:03 PM EDT
Location: /dev/ph
Posts: 4,996
Thanks: 73
Thanked 475 Times in 437 Posts
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.
Sponsored Links
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Differences in BASH and ASH shells regarding if command? Bashingaway UNIX for Dummies Questions & Answers 6 09-13-2010 06:33 PM
Difference in command syntax different shells hobiwhenuknowme UNIX for Dummies Questions & Answers 2 08-15-2010 05:44 PM
man command linux.user Linux 5 04-08-2010 10:52 PM
Spawning new shells from the command line in OpenStep 4.2 Rocketman8541 Shell Programming and Scripting 3 09-13-2004 11:12 AM
Man command shipoffools UNIX for Dummies Questions & Answers 5 10-16-2001 02:04 PM



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