The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sed changes go to standard out....? jimmyc Shell Programming and Scripting 6 03-26-2008 12:01 PM
Synopsis 0.10 (Default branch) iBot Software Releases - RSS News 0 03-20-2008 08:40 PM
To know the standard nagalenoj UNIX for Advanced & Expert Users 2 02-07-2008 11:30 AM
sudo & Sox compliance rwallaceisg UNIX for Advanced & Expert Users 1 05-16-2007 06:13 PM
standard input Jariya Shell Programming and Scripting 1 06-06-2006 12:49 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-05-2007
vkleban vkleban is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 3
man synopsis standard compliance

In different online sources, I found bits and pieces of information about those square and angular brackets and pipes. From what I have read, I can conclude it looks like this:

1. Options outside any brackets are mandatory
2. Options inside these < .. > are mandatory too
3. Options inside [ .. ] are optional
4. | works like an "exclusive or", separating options inside the brackets they are placed (or outside in case they are not inside any brackets).
5. Options listed with no separators with '-' in front (ex: -abcd) can be used in any combination with each other (i.e. "inclusive or")

First problem is that I'm not even sure I am correct here. Second, I cannot convince developers (I am a tester) to be compliant with any standard in user's manual and in help, since I cannot find any standard. Our project has several dozens of command line utilities each with elaborate parameter strings. The developers make them even more confusing by using '|' both as exclusive and inclusive or. In our latest release I realized that those confuse even me, so I'm concerned about our clients. Is there any standard to which man synopsis with those brackets and pipes is compliant? Is there any convincing source online, where that standard is carefully described?

Last edited by vkleban; 12-05-2007 at 05:33 PM..
  #2 (permalink)  
Old 12-05-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Interesting, GNU coding standards are very lean on this topic.

I've had a look at a Solaris example...

Code:
     man [-] [-adFlrt] [-M path] [-T macro-package]  [-s section]
     name...
Notice that there is not an option "-adFlrt", they are all different flags, but with no inclusive OR between them. I would tend towards the exclusive OR however I would make the documentation concise and remove ambiguity.
  #3 (permalink)  
Old 12-05-2007
vkleban vkleban is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 3
Yes, good point about Solaris. Is seems that my research has failed It is very strange that such a fundamental thing in all UNIXes and UNIX-like operating systems is not standardized in any way.
  #4 (permalink)  
Old 12-05-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by vkleban View Post
It is very strange that such a fundamental thing in all UNIXes and UNIX-like operating systems is not standardized in any way.
Not really, UNIX is about mechanism, not policy.
  #5 (permalink)  
Old 12-06-2007
drl's Avatar
drl drl is offline Forum Advisor  
Registered User
  
 

Join Date: Apr 2007
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 712
Hi.

Is this convincing?
Quote:
bold text type exactly as shown.
italic text replace with appropriate argument.
[-abc] any or all arguments within [ ] are optional.
-a|-b options delimited by | cannot be used together.
argument ... argument is repeatable.
[expression] ... entire expression within [ ] is repeatable.

The command or function illustration is a pattern that should match all
possible invocations. In some cases it is advisable to illustrate sev-
eral exclusive invocations as is shown in the SYNOPSIS section of this
manual page.

-- excerpt from GNU/Linux man man
I agree that consistency is to be valued - especially for a set of commands in a specific project -- however, {GNU/Linux, Solaris, other *nix}-universe consistency and consensus is unlikely in my opinion. It may even be undesirable -- too many rules have a chilling effect on innovation.

Your particular situation may be saying more about your developers than about the *nix universe.

Best wishes ... cheers, drl
Closed Thread

Bookmarks

Tags
linux commands

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:41 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0