I have a VB.net console application with command line arguments. Like ("-Arg1=Value1 -Arg2=Value2 -Arg3="Value 3") this i'm passing arguments from project properties -> Debug ->Command line arguments.  My plan is to run this console application from batch(.bat) file. I can able to run like this.  @echo off  D:\Project\Bin\Debug\abc.exe %* -Arg1=Value1 -Arg2=Value2 -Arg3="Value 3"   But my expectation is while running console application it need to ask values for    -Arg1, -Arg2 &amp; -Arg3   I need to pass values at run time.
27868
I need to pass an ID and a password to a batch file at the time of running rather than hardcoding them into the file.  Here's what the command line looks like:  test.cmd admin P@55w0rd &gt; test-log.txt
83024
I have two arrays:  arrayA=(1 2 3) arrayB=(a b c)   and I want to print out one of them using a command line argument, i.e., without any if else.  I tried a few variations on the syntax with no success. I am wanting to do something like this:  ARG="$1"  echo ${array${ARG}[@]}   but I get a "bad substitution" error. How can I achieve this?
61544
How can I replace the default program providing console windows under Windows XP?  I know of , and I have a shortcut to start cmd.exe in . But now I want console applications to start in Console2 rather than the default console program, even when I have no control over the program that starts the console application. (I.e. a non-console program starts consoleapp.exe, and I can't change it to start Console2 instead, but I still want the application to be started inside a new instance of Console2.)  (Note that I want to replace the console itself, that is, the window in which console (i.e. text mode) applications run. And I must be able to run arbitrary, unmodified console applications: a substitute for a specific console program such as Cmd won't do me any good.)  EDIT: So what I'm after is a , which           OT: I want to know when Microsoft is going to make a decent CSRSS replacement. Not being able to adjust the width of a "terminal" by resizing the window is a complete joke.         Go download the ISE already. (It's included in Win7/2008R2.)   But as far as I understand this ISE is an , not a general console emulator.
53288
myscript [-a a-arg] [-c c-arg] [-b] [-e] somedirectory   Given that I want my shell script be invoked at the command line using the above parameters - where [these brackets] denote that they are optional - what is the best method to parse them?
59878
I want to pass an enum value as command parameter in WPF, using something like this:  &lt;Button      x:Name="uxSearchButton"      Command="{Binding Path=SearchMembersCommand}"      CommandParameter="SearchPageType.First"     Content="Search"&gt; &lt;/Button&gt;   SearchPageType is an enum and this is to know from which button search command is invoked.  Is this possible in WPF, or how can you pass an enum value as command parameter?
119249
I use -x for debug info while executing the shell script.  How can I redirect debug info only to a file?  Example script:  #!/bin/bash echo OK echo NO   i will get the below result when i run in debug mode  + echo OK OK + echo NO NO   I would like to redirect only the debug info to a file.  + echo OK + echo NO   And runtime output should print on the screen.  OK NO
115482
How exactly using VB6 can I can call any Windows shell command as you would from the command-line?  For example, something as trivial as:  echo foo
2158
This works as expected:  $ echo a b c | xargs --replace="{}" echo x "{}" y x a b c y   This does too:  $ echo a b c | xargs --max-args=1 echo x x a x b x c   But this doesn't work as expected:  $ echo a b c | xargs --max-args=1 --replace="{}" echo x "{}" y x a b c y   And neither does this:  $ echo a b c | xargs --delimiter=' ' --max-args=1 --replace="{}" echo x "{}" y x a y x b y x c  y   I expected this output:  x a y x b y x c y   As a workaround, I am using printf and two xargs, but that is ugly:  $ echo a b c | xargs printf '%s\0' | \ &gt; xargs --null --max-args=1 --replace="{}" echo x "{}" y x a y x b y x c y   Any idea why this is happening?
81192
During development (and for debugging) it is very useful to run a Java class' public static void main(String[] argv)  method directly from inside Eclipse (using the Run As context menu).  Is there a similarily quick way to specify command line parameters for the run? What I do now is go to the "Run Dialog", click through the various settings to the tab where I can specify VM and program arguments and enter them there.  Too many steps, plus I do not want to mix the more permanent runtime configuration settings with the one-off invokation parameters. What I want instead is to check a box somewhere (or have a separate menu item "Run as Java application with command line") and then be prompted for the commandline every time (with a nice history).
11030
I have a Virtual Machine in Virtual PC 2007.  To start it from the desktop, I have the following command in a batch file:  "c:\program files\Microsoft Virtual PC\Virtual PC.exe" -pc "MY-PC" -launch   But that leaves a dos prompt on the host machine until the virtual machine shuts down, and I exit out of the Virtual PC console.  That's annoying.  So I changed my command to use the START command, instead:  start "c:\program files\Microsoft Virtual PC\Virtual PC.exe" -pc MY-PC -launch   But it chokes on the parameters passed into Virtual PC.  START /? indicates that parameters do indeed go in that location.  Has anyone used START to launch a program with multiple command-line arguments?
18012
I have a single string that contains the command-line parameters to be passed to another executable and I need to extract the string[] containing the individual parameters in the same way that C# would if the commands had been specified on the command-line. The string[] will be used when executing another assemblies entry-point via reflection.  Is there a standard function for this? Or is there a preferred method (regex?) for splitting the parameters correctly? It must handle '"' delimited strings that may contain spaces correctly, so I can't just split on ' '.  Example string:  string parameterString = @"/src:""C:\tmp\Some Folder\Sub Folder"" /users:""abcdefg@hijkl.com"" tasks:""SomeTask,Some Other Task"" -someParam foo";   Example result:  string[] parameterArray = new string[] {    @"/src:C:\tmp\Some Folder\Sub Folder",   @"/users:abcdefg@hijkl.com",   @"tasks:SomeTask,Some Other Task",   @"-someParam",   @"foo" };   I do not need a command-line parsing library, just a way to get the String[] that should be generated.  Update: I had to change the expected result to match what is actually generated by C# (removed the extra "'s in the split strings)
20243
What is a good way of parsing command line arguments in Java?
79136
So I'm in Linux and I want to have a program accept arguments when you execute it from the command line.  For example,   ./myprogram 42 -b -s  So then the program would store that number 42 as an int and execute certain parts of code depending on what arguments it gets like -b or -s.
12229
How can I check if an application is running from a batch (well cmd) file?  I need to not launch another instance if a program is already running. (I can't change the app to make it single instance only.)  Also the application could be running as any user.
59198
I'm looking for some way to run a batch file (.bat) without anything visible to the user (no window, no taskbar name, .etc..).  I don't want to use some program to do that, I'm looking for something cleaner. I've found  that uses VBScript, but I don't really like using VBS, either.
6943
I have a program that takes input from   stdin and also takes some parameters   from command line. It looks like this:  cat input.txt &gt; myprogram -path "/home/user/work"       I try to debug the code with gdb   inside emacs, by M-x gdb, I try to   load the program with the command:  gdb cat input.txt &gt; myprogram -path "/home/user/work"       However, gdb does not like it.   Question cribbed from . Unfortunately I don't understand the solution and am not sure what to do beyond compiling with the -g option and running the command M-x gdb.
80763
Typical Unix/Linux programs accept the command line inputs as an argument count (int argc) and an argument vector (char *argv[]). The first element of argv is the program name - followed by the actual arguments.   Why is the program name passed to the executable as an argument? Are there any examples of programs using their own name (maybe some kind of exec situation)?