How do you run a .exe with parameters using vba’s shell()?

This works for me (Excel 2013): Public Sub StartExeWithArgument() Dim strProgramName As String Dim strArgument As String strProgramName = “C:\Program Files\Test\foobar.exe” strArgument = “/G” Call Shell(“””” & strProgramName & “”” “”” & strArgument & “”””, vbNormalFocus) End Sub With inspiration from here https://stackoverflow.com/a/3448682.

Passing command line unicode argument to Java code

Unfortunately you cannot reliably use non-ASCII characters with command-line apps that use the Windows C runtime’s stdlib, like Java (and pretty much all non-Windows-specific scripting languages really). This is because they read their input and output using a locale-specific code page by default, which is never a UTF, unlike every other modern OS which uses … Read more

Escape command line arguments in c#

It’s more complicated than that though! I was having related problem (writing front-end .exe that will call the back-end with all parameters passed + some extra ones) and so i looked how people do that, ran into your question. Initially all seemed good doing it as you suggest arg.Replace (@”\”, @”\\”).Replace(quote, @”\”+quote). However when i … Read more

What is the difference between “$@” and “$*” in Bash? [duplicate]

The difference is subtle; “$*” creates one argument separated by the $IFS variable, while “$@” will expand into separate arguments. As an example, consider: for i in “$@”; do echo “@ ‘$i'”; done for i in “$*”; do echo “* ‘$i'”; done When run with multiple arguments: ./testvar foo bar baz ‘long arg’ @ ‘foo’ … Read more

How to export and import a .sql file from command line with options? [duplicate]

Type the following command to import sql data file: $ mysql -u username -p -h localhost DATA-BASE-NAME < data.sql In this example, import ‘data.sql’ file into ‘blog’ database using vivek as username: $ mysql -u vivek -p -h localhost blog < data.sql If you have a dedicated database server, replace localhost hostname with with actual … Read more