command-line

Finding the path of the program that will execute from the command line in Windows

Say I have a program X.EXE installed in folder c:\abcd\happy\ on the system. The folder is on the system path. Now suppose there is another program on the system that's also called X.EXE but is installed in folder c:\windows\. Is it possible to quickly find out from the command line that if I type in X.EXE which of the two X.EXE's will ...

Java key listener in Commandline

Most demo showing keyevent in Swing, what is the equivalent in commandline? ...

how to implement the options/arguments for the command line functions in python

my python version is 2.4.3. Now I am developing a CLI with cmd module from python for a CD player. I have some classes like CDContainer (with method like addCD, removeCD, etc), CD (with method like play, stop, pause). Now, I want to add some options for the commands and also if the options inputs are not correct, the CLI could return pr...

does a runonce command exist to limit command execution

Does this command exist for Linux? runonce --dampen 300 echo "hello" The command would take a command to run and optional criteria to limit of frequently it is executed. The option dampen says wait 300 milliseconds and then run the command. Any other executions of this command get coalesced into a single run. This allows you to colla...

bash - first argument of the previous command

Hi I know that ESC DOT gives you the last argument of the last command. But I'm interested in first argument of the last command. Is there a key binding to do so? On the same lines, is there a generic way of getting nth argument from last command. (I know that in a bash script you can use $0, $1 etc., but these don't work on commandli...

Need Linux cmd-line app to compare binary files and exit on 1st mis-match...

Is there a Linux command-line app which will compare two binary files and exit on the first mis-match? cmp doesn't seem to have the quit opition. ...

C# - Process redirected output - Console different to CMD window

I have an application with a Process that use a cmd program. The Process's output is redirect like so: pr.StartInfo.RedirectStandardOutput = true; pr.StartInfo.UseShellExecute = false; pr.StartInfo.CreateNoWindow = true; pr.EnableRaisingEvents = true pr.StartInfo.WindowStyle = ProcessWindowStyle....

exception handling for optparse of python

HI, guys. I am using cmd and optparse to develop a CLI.py for a collection of already-functional classes (CDContainer, CD, etc.). The following are some parts of the code. I have a problem here. when there are exceptions(wrong input type or missing values), the optparse will exit the whole program instead of the specific command method...

automatically build, deploy and test on iphone device

Is there way to build iphone app on the command line with xcodebuild, then automatically deploy the app to a USB-connected iphone device and run some unit testing on device? Right now, I can do this under xCode with "Build and Run", but I'm looking for solution to do this outside of the xCode GUI environment. Thanks ...

Generate .cpp source from a .h file

The barebones version of a .cpp file is often not much more than a copy of the related header file with some braces instead of semicolons, ClassName:: inserted in a few places, and removing the virtual keyword. Much of it could be generated with a one-line sed command, but it wouldn't be very robust for all the language features (templat...

Is there a better mplayer command line interface?

I generally prefer to do things on the command line when I can. Mplayer is a great tool for playing all sorts of media, but the command line interface sucks. Some things I'd like to see in a CLI wrapper would include: Clean output - easy to understand, not cluttered by a bunch of stuff that's irrelevant in day-to-day use ID3 informatio...

How do I change my gdb path in Unix?

My professor posted this online for a lab this week, but I missed the tutorial and didn't find how to do this. Does anyone know? It is just a simple command line thing, but I have been hunting around and can't seem to figure it out... Hi everyone, A new version of gdb (version 6.8) has been installed on the servers csb and csg (but not...

Create a function to check for key press in unix using ncurses

I have been looking for an equivalent to kbhit() and I have read several forums on this subject, and the majority seems to suggest using ncurses. How should I go about checking if a key is pressed in c++ using ncurses. The function getch() provided by ncurses reads character from the window. I would like to write a function that only c...

.jar working in command line but NOT in windows explorer

I have an SWT application that I'm trying to create a runnable .jar for; unfortunately, I cannot seem to run it from Windows Explorer, as I get an error from the Java Virtual Machine Launcher stating it: "Could not find the main class gui.MainWindow. Program will exit." However, it will run through command line java -jar xxxxx.jar ...

VS2010 Web Publish command line version of File System deploy

Folks, In a nutshell, I want to replicate this dialog: It's a Visual Studio 2010 ASP.Net MVC project. If I execute this command, I get all the files I want, including the transformed web.configs in the "C:\ToDeploy" directory. I want to replicate this on the command line so I can use it for a QA environment build. I've seen various...

How to compress multiple specific folders into individual archives

A folder structure like following: How could I compress the 6 specific folders listed to a archive file, and keep the hierarchy by using way of 7z command line. ...

How do I access command line arguments in Python?

I use python to create my project settings setup, but I need help. I tried reading but can't find info to do this: $python myfile.py var1 var2 var3 In my Python file I need to use all vars that are input. ...

Can you run a .class file from terminal that is outputted by an IDE

I am trying to run a file from command line. The file is a .class file and is apart of a larger project that I compiled in Netbeans. I navigated to the .class file and ran java MyFile And I got: Exception in thread "main" java.lang.NoClassDefFoundError: PersonTest/class Caused by: java.lang.ClassNotFoundException: PersonTest.class ...

TFS command line to get list of files checked in yesterday

I'm looking for a simple way to get a list of files that were checked in on a certain day. Is there a command line I can use? I don't want changesets just the file names. ...

complete xmp/iptc manipulation command line tool or python wrapper? (osx)

hi guys, im searching for a complete command line tool or even better a python wrapper to manipulate and retrieve image metadata. i tried pyexiv2 which is very nice but i cant register a new namespace like 'XMP.imageapp.uuid' (maybe im missing something and i would be glad to hear a solution for that.) with the command line tool exiv2...