All Questions
7
questions
-1
votes
1
answer
329
views
How to check for passed options using getopts in a POSIX shell? (Report, count, and discard.)
How to check for passed options using getopts (man page) in a POSIX shell? (Report, count, and discard.)
My idea is this: Many of my scripts take no options (not even -h for help, I am transitioning ...
2
votes
2
answers
87
views
Why is `-W` reserved for vendor extensions?
Why does the POSIX standard reserve the -W option for vendor extensions of the system utilities? I do not understand why the letter ‘W’ is used. ‘V’ (for vendor) could make more sense.
Maybe this ...
7
votes
3
answers
2k
views
Difference between 'sed -e' and delimiting multiple commands with semicolon
I am perhaps picking nits here, but it would be really good to have this question that's been bothering me answered once and for all...
Text file for reprex:
Line one.
Line two.
Line three.
Line four....
0
votes
1
answer
710
views
Make all files in a dir executable (non-recursively) while strictly-ensuring non-recursivness
I grasp the heading of this question odd, but I do wonder if in some situations there should be a need to take extra caution and somehow "enforce" non-recursivness when changing permissions with chmod ...
1
vote
2
answers
66
views
Should the operands to a utility always appear after all the options to the utility?
POSIX says
utility_name[-a][-b][-c option_argument]
[-d|-e][-f[option_argument]][operand...]
...
The arguments following the last options and option-arguments are
named "operands".
...
1
vote
1
answer
1k
views
Order between options and operands?
When using a utility program, we may specify options (and their option arguments) and/or operands.
In most cases (in the sense of conforming to some standard (POSIX?))
does the order between ...
3
votes
3
answers
636
views
Interactive command usage reference: do you generally have that on Unix?
The question of why some commands rely on manpages whereas others rely on something like the --help flag for providing command usage reference is not new. There is usually a difference in scope ...