Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


Search this Thread
Old 02-22-2011, 02:35 AM   #1
Registered: Jun 2007
Location: Munich, Germany
Distribution: RHEL, CentOS, Fedora, SLES (...)
Posts: 399

Rep: Reputation: 38
Standard for commandline options

Is there any document or specification like the Linux Standard Base for the naming convention of commandline options?
Old 02-22-2011, 04:00 AM   #2
Senior Member
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,630
Blog Entries: 3

Rep: Reputation: 345Reputation: 345Reputation: 345Reputation: 345
Are you talking about this? There's a link in that to a table of all the long options and how they're abbreviated in various programs
Old 02-23-2011, 02:59 PM   #3
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Additionally, if you're programming in C or C++, it's generally considered good form to use "getopt()" instead of rolling your own, ad hoc command line parser.

Although I confess - I routinely violate this guideline
Old 02-23-2011, 04:04 PM   #4
Senior Member
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,670

Rep: Reputation: 1440Reputation: 1440Reputation: 1440Reputation: 1440Reputation: 1440Reputation: 1440Reputation: 1440Reputation: 1440Reputation: 1440Reputation: 1440
And if you're programming in Python, then you should use argparse instead of rolling your own.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
what does "standard error was duplicated as standard output" mean? nickleus Linux - General 4 09-15-2006 06:14 AM
Kernel 2.6.2 options question - LOCKED options ? tvojvodi Linux - General 0 02-17-2004 04:23 AM
Commandline Handbook SloHands General 11 01-31-2003 01:38 PM
standard vs Expert install? Standard flubs up! Frost Linux - Software 1 03-27-2002 07:55 AM
Netscape6 commandline options fatgod Linux - General 0 03-24-2002 12:36 PM

All times are GMT -5. The time now is 02:58 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration