💻 Software
Passing options to a program: what's the convention for one dash vs two?
Fresh7 days ago
Mar 15, 20261951 viewsConfidence Score0%
0%
Problem
Some programs will take options like this: And other programs will use something like this: Is there a "rule" or convention for this in Linux/Unix/OSX?
Error Output
$ someprogram -orange apple
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: Passing options to a program: what's the convention for one dash vs two?
Low Risk
The most common is GNU style, with one dash for short options and two dashes for long options. Initially, Unix programs took single-letter options preceded by a single dash and optionally bundled: The two commands above are equal. When an option tak…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix