#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    20
    Rep Power
    0

    Man page symbols


    where do you for guidance on how to interpret the symbols used in the synopsis section of a man page? for instance [ ] or |? like is anything in [ ] to be considered as optional? where is thei defined?
  2. #2
  3. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,387
    Rep Power
    1871
    From typing 'man man'

    The following conventions apply to the SYNOPSIS section and can be used as a guide in other sections.

    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.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    20
    Rep Power
    0

    more


    Originally Posted by web9452
    where do you for guidance on how to interpret the symbols used in the synopsis section of a man page? for instance [ ] or |? like is anything in [ ] to be considered as optional? where is thei defined?
    what if you have a|b|c????
  6. #4
  7. Wiser? Not exactly.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    5,947
    Rep Power
    4033
    Originally Posted by web9452
    what if you have a|b|c????

    Originally Posted by salem
    -a|-b options delimited by | cannot be used together.
    Having a|b|c means you can use a, or b, or c, but not a mixture of them.

    So if an entry read:
    command add|remove|update name

    Then you could run
    command add
    or command remove
    or command update

    but not something like
    command add update
    Recycle your old CD's, don't just trash them



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud

IMN logo majestic logo threadwatch logo seochat tools logo