command-line

How do command-line interpreters work?

I have been under the impression that processes on the operating system have three standard streams: stdin, stdout, and stderr. I have also thought that text editors like vim work by taking input over stdin and sending ANSI escape characters over stdout. However, my view of how command-line interpreters isn't holding up in this one case:...

Best practice for a recursive console tool in Python

What is the best practice (interface and implementation) for a command line tool that processes selected files in a directory tree? I give an example that comes to my mind, but I am looking for a 'best practice': flipcase foo.txt foo2.txt could process foo.txt and save the result as foo2.txt. flipcase -rv *.txt could process all ...

How can I get information from the shell about commands available in Android shell?

Can't find information on how to print out documentation on android shell commands while in the shell. Something along the lines of help ls ...

Capture specific-sized images with an Ubuntu command-line program

Dear stackers, I am currently working on a project and would like to know if you heard of any command-line tools (OS: Ubuntu) that lets your webcam take specific-sized images ? I found some but none of them works. In my case, I'd need to capture 1600x1200 pictures. Thanks a lot ! Rolf ...

Is it possible to launch IE's proxy settings dialog from the command line?

Is there a way to launch the IE proxy settings dialog from the Windows command line to save time going through menus in any application? ...

Conventional ways to pass arguments to interpreted program

I'm writing an interpreter. The interpreter accepts arguments that it itself uses, including a file to interpret. The interpreted program should not see the interpreter arguments when it queries for arguments and should see arguments meant for the interpreted program. But that's not difficult to do. Instead, I'm interested in styles on h...

svn Merge Problem (3 levels of svn)

Hi all, I am new to use svn and the company in which I work uses three levels (I don't know whether this is a correct word to use here) of svn. I mean the developers are provided a working directory on a testing server. When we commit, it goes to the dev server. When a manager commits it from there it goes to production server. I am a d...

How to catch command prompt errors in asp.net code?

I am running ffmpeg.exe from command prompt through asp.net code. Is there any method to know success and errors of the ffmpeg.exe execution in asp.net code ? My code is as follows: string OutputFile, FilArgs; //output file format in swf //outputfile = SavePath + "SWF\\" + withoutext + ".swf"; Outp...

uncompressing a large number of files on the fly

i have a script that i need to run on a large number of files with the extension *.tar.gz. what i want to do is instead of uncompressing them and then running the script, i want to be able to uncompress them as i run the command and then work on the uncompressed folder, all with a single command. i think a pipe is a good solution for t...

How can I programmatically deploy an .xbap to a specific folder?

I need to publish an .xbap application to a certain folder. The .xbap itself will be executed automatically. How can you publish an .xbap programmatically? Please see attached screenshot! Please use following link to see the screenshot! Unfortunately I was not able to attach it in this post! Link to screenshot ...

How to execute another python script from your script and be able to debug?

You have wrapper python script that is calling another python script, currently using os.system('python another.py some-params'). You want to be able to debug both scripts and if you use os.system() you'll loose the debugger, so it does make sense to load the second script using the same interpretor instead of starting another one. imp...

Creating a script from a complex bash command

I need to run the following command in a folder containing a lot of gzipped files. perl myscript.pl -d <path> -f <protocol> "<startdate time>" "<enddate time>" -o "0:00 23:59" -v -g -b <outputfilename> My problem is that the command does not take gzipped files as input. So, I would need to unzip all those gzipped files on the fly and...

Parse string as if it was a command with params and options

I have this Java enum: public enum Commands { RESIZE_WINDOW("size -size"), CREATE_CHARACTER("create-char -name"), NEW_SCENE("scene -image"), DIALOG("d -who -words"), PLAY_SOUND("sound -file --blocking=false"), FADE_TO("fade-to -file"), WAIT("w -length=auto"); } I want to be able to parse those strings and e...

Relative paths in visual studio command-line file directory

I'm writing a post build event for visual studio project. I have: java -jar "$(ProjectDir)..\Tools\closure_compiler.jar" but it turns out to be after compiled: "D:\Projects\Source\Proj.Web\..\Tools\closure_compiler.jar" which is an invalid directory, it just appends the dots. My problem is that I want to go back up 1 directory. Th...

command-line arguments separator and how to check for it in C#

what are the characters used to separate command-line arguments (such as white space, \t)? How do you check whether a string contains a separator? for example: Check("abcd") is false and Check("ab cd") or Check("ab\tcd") is true ...

cp command should ignore some files

Sometimes I need to perform following command cp -rv demo demo_bkp However I want to ignore all the files in directory .git . How do I achieve that? It takes a long time to copy .git files and I do not need those files. ...

How to create a CLI program with "shell prompt"?

Hi, I'm very new in programming. The following task looks very simple but I don't know how to do it. Appreciate if anyone can give me some guidance. I'm using Linux OS. I would like to create a CLI program and let the user run it in shell terminal. I plan to use Bash shell script to create this program, but C++ or Perl should be ok too...

TeamCity command line build runner: How to make the build fail?

We're using TeamCity's command line build runner to call a bat-file. The bat-file builds our solution by calling the Visual Studio 2008's "devenv.exe" and then it executes the unit tests and creates the correct folder structure. What we would like to do is to stop executing the bat-file if the call to devenv fails and make the TeamCity...

Skip unknown command line arguments

In a current application I have, the incoming command line parameters are parsed on several "levels". At the highest level I only wish to parse some options and leave the rest to "lower levels". however, all libraries I've tried so far (Common Cli, args4j, JOpt, gnu.jargs) al throw an "unknown option" exception when I'm trying to feed t...

C# Command line application working path

I have a command line application that resides in the system32 folder so that i can call this application from anywhere with out having to fill in the full path to the app. The app takes in one parameter which is a full file path (EX: C:\Test\Test.txt) and works fine when it takes in this parameter (EX: C:\Test>Test.exe C:\Test\test.txt)...