LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 02-22-2011, 02:35 AM   #1
brianmcgee
Member
 
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
Snark1994
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
paulsm4
Guru
 
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
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,616

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


Reply


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 05:22 AM.

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