I've just noticed a pattern (in git and the CommandLineParser lib for .NET) for verb-style command arguments, and wondering if someone can confirm:
myprog dothis -a "someArg"
-a
--arg
What's the difference between the single-dash-prefix and the double-dash-prefix? Is the single dash prefix always for a single-letter argument specifier, where
it1352
0
2020-10-06
I have always wondered how people update a previous line in a command line. a great example of this is when using the wget command in linux. It creates an ASCII loading bar of sorts that looks like this:
[======> ] 37%
and of
it1352
4
2019-05-14
For learning purposes i'm developing a Class generation application in c# and winforms. I think It could be fine to include a command-line mode that allow to use the application in scripts.
It's a good practice to include a command-line mode in my applications? It would be better to have two different programs, one with GUI in one for the command-
it1352
4
2019-05-14
I am trying to deploy the hyperlegder sawtooth in my windows local machine from the below repository 'https://github.com/hyperledger/education'.
When I start the application using Docker, then I am getting an error for the tunachain-tp as below
tunachain-tp | /usr/bin/env: 'python3\r': No such file or directory
I have tried to solv
it1352
0
2020-10-06
I would like to make my python script run from the command line when supplies with some arguments. However, one of the arguments should be a list of options specific to one segment of the script. Would string parsing be the only way to do this by actually constructing the list after the "command line list" string is split from commas? If so, how wo
it1352
1
2019-05-14
I have a class:
class Options
{
// Remainder omitted (verb1, verb2, verb3)
[HelpVerbOption]
public string GetUsage(string verb)
{
return HelpText.AutoBuild(this, verb);
}
}
In this documentation (in the last part) says:
...The parser will pass null to master class GetUsage(string) also if
the user requested the help index wi
it1352
24
2019-05-10
I've read this http://docs.python.org/release/2.6.2/library/optparse.html
But I'm not so clear how to make an option to be required in optparse?
I've tried to set "required=1" but I got an error:
invalid keyword arguments: required
I want to make my script require --file option to be input by users. I know that the action keyword gives you
it1352
3
2019-05-14
The Go documentation (http://golang.org/pkg/flag/) says:
The FlagSet type allows one to define independent sets of flags, such as to implement subcommands in a command-line interface.
I need this functionality but I can't figure out how to persuade the flag pkg to do it. When I define two FlagSets, parsing one of them will give me errors and
it1352
1
2019-05-14
Language: C#
I have to pass a huge string array (built dynamically) as an argument to run an exe.
I am thinking of acheiving it by the below 2 ways. But I am not feeling confident.
I can create it as one string delimited by spaces. I can invoke the exe through Process.Start.
Hence the running child process considers the space and holds as a str
it1352
0
2020-10-06
I am looking to do some error checking for my command line arguments
public static void main(String[] args)
{
if(args[0] == null)
{
System.out.println("Proper Usage is: java program filename");
System.exit(0);
}
}
However, this returns an array out of bounds exception, which makes sense. I am just looking for the pro
it1352
8
2019-05-14