Tags "command-line" Result

Conventions for command line verb arguments -a vs --arg

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

How to animate the command line?

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

Should I include a command line mode in my applications?

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

Defining Independent FlagSets in GoLang

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

commandline argument parameter limitation

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

Java: Check if command line arguments are null

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