A
A
AStahl2012-08-03 17:08:45
Command line
AStahl, 2012-08-03 17:08:45

The behavior of the program depends on the order of the parameters. Will it take off?

There is a parser.
Parameters specify what exactly to parse.
Wanting to give the user the ability to choose the output sequence of parsed data, I made the following decision:
The output sequence is indicated by the sequence of parameters.
The parameters themselves, of course, do not change their meaning from the position.
What do you think? Will it take off?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
U
uzzz, 2012-08-03
@uzzz

Somehow it's not obvious. Unix does not do this. At least I have not met. And I would be embarrassed if the output suddenly changed from the order.
I would make a separate parameter like --output-format

A
adsinger, 2012-08-03
@adsinger

Not the best idea - get confused, wrap everything in an object or output format string.

U
uzzz, 2012-08-04
@uzzz

Yes I understand. Here is a good utility example: ps.
ps ax produces the same output as ps xa. And if there is a need to change the format, then for this you need to use --format.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question