command-line

Automate file copying from Windows command line

Say you have 100 directories and for each directory you have a file named .pdf stored somewhere else. If you want to move/copy each file into the directory with the same name, can this be done on the Windows command line? ...

Is there a FOSS batch compiling solution for Delphi that takes version as an input parameter?

Is there a FOSS batch compiling solution for Delphi that takes version as an input parameter? I am using Delphi 7 and this remains the most tedious operation. Are there any other solutions, workarounds to make this easy. ...

How to make a python, command-line program autocomplete arbitrary things NOT interpreter

I am aware of how to setup autocompletion of python objects in the python interpreter (on unix). Google shows many hits for explanations on how to do this. Unfortunately, there are so many references to that it is difficult to find what I need to do, which is slightly different. I need to know how to enable, tab/auto completion of ...

Argument-parsing helpers for C/UNIX

I know of the following: the venerable getopt(3) the extended getopt_long glibc's argp parser for unix-style argument vectors popt from the GNOME project (or its spiritual successor in Glib) I'm sure there's more that I haven't used or even heard of; a quick Google search reveals Gopt, argtable, and Optlist. Personally, I like argp ...

How to acquire specific revision of a newly added file from CVS via command line?

One of our internally written tool is fed a cvs commit trace of the form: Checking in src/com/package/AFile.java; /home/cvs/src/com/package/AFile.java,v <-- Afile.java new revision: 1.1.2.56; previous revision: 1.1.2.55 done The tool then acquires the file from cvs by issuing a "cvs update -r 1.1.2.56" command in a working ...

How do I parse command line arguments in bash?

Say I have a script that gets called with this line: ./myscript -vfd ./foo/bar/someFile -o /fizz/someOtherFile or this one: ./myscript -v -f -d -o /fizz/someOtherFile ./foo/bar/someFile What's the accepted way of parsing this such that in each case (or some combination of the two) $v $f $d will all be set to true and $outFile will ...

Third-party windows command-line program?

Looking for a better Windows XP command-line interface. The Visual Studio Command Prompt isn't near as nice as the Linux/OSX terminals. Thoughts? edit: Answers: Console on Sourceforge, and the Windows Powershell. Thanks, I'll go dig them up and evaluate them. The Cygwin package is too much overhead for what I want. edit2: Looks like...

How can I make the "find" Command on OS X default to the current directory?

I am a heavy command line user and use the find command extensively in my build system scripts. However on Mac OS X when I am not concentrating I often get output like this: $ find -name \*.plist find: illegal option -- n find: illegal option -- a find: illegal option -- m find: illegal option -- e find: *.plist: No such file or directo...

Making iTerm to translate 'meta-key' in the same way as in other OSes

In bash shell with emacs key-binding, you can use key combination like M-f, M-b to move one word forward or backward on the shell prompt respectively. Usually, the meta key is mapped to Alt key on Windows and Linux. However, in iTerm, I could not find a way to map this meta key to either Option or Command key on my MacBook Pro. It seems...

Java file input as command line argument

How do you process information in Java that was input from a file. For Example: suppose you have a file input.txt. The contents of this file is: abcdefghizzzzjklmnop azzbcdefghijklmnop My hope would be that the information would be put into the argument array of strings such that the following code would output "abcdefghizzzzjklmnop...

C# Hiding form when running form program from the command line

Hi all, I'm working on a program that is form based but I have been asked to add some command line support, this works fine apart from the form flashes up and closes down when running from the command line. Is there anyway to hide the form whilst the command line is running? Some code does refer to controls so the gui would need to be a...

Lost use of forward slash in windows command prompt

I can no longer use / at the windows xp command prompt, and it seems to have started after a botched cygwin installation, e.g. cd /windows won't work, but used to. Can anyone think of how this might have happened? OOPS! It doesn't normally work in XP, though I had read that it does in Vista. I simplified my problem and it was wrong. Th...

Connecting to an Oracle database on the command-line without using the Oracle client software?

I have access to an Oracle server that has some databases that I would like to access. However, the machine that I have access from has none of the oracle client software. Is there any alternative to oracle's client software the provides the functionality of something like MySQL's mysql or Postgres' psql? I'd like to be able to poke arou...

Anyone know of a free/Cheap command-line resource editor for managed win32 exes/dlls

I have been recommended "Resource Tuner console" but it's a little out of my price range. I'm looking for something that could be launched from a nant build script and told to stamp an exe with an additional property as described in my previous question. ...

Can an Adobe AIR Application run via the command line output to console?

I have an AIR application that takes command-line arguments via onInvoke. All is good, but I cannot figure out how to print some status messages back to the user (to stdout / console, so to speak). Is it possible? Even a default log file for traces would be fine, but I can't find any info about it anywhere. Do I need to create my own lo...

How do I reuse a command in bash with different parameters?

I have two scripts that often need to be run with the same parameter: $ populate.ksh 9241 && check.ksh 9241 When I need to change the parameter (9241 in this example), I can go back and edit the line in history. But since I need to change the number in two places, I sometimes make a typo. I'd like to be able to change the parameter ...

Can I set a different data directory for Internet Explorer?

In Google Chrome, I can provide the command-line argument --user-data-dir="..." to have Chrome use a different directory for state like cookies, cache, and so forth. This makes it possible to trivially load web pages from a "fresh" browser and simulate multiple independent users. How can I do the same thing with Internet Explorer (eith...

Starting/Stopping a service on Windows 2008 Server from the command line - access denied

I am trying to start a service from the command line using "net start SERVICENAME" and I get an access denied error. I am an administrator on this server since I am in a domain group that are admins on the server. I can start/stop the service from the Services tool. I am new to 2008/Vista so maybe I am just missing something.. update:...

How to get current datetime on windows command line, in a suitable format for using in a filename?

What's a windows command line statement(s) I can use to get the current datetime in a format that I can put into a filename? I want to have a .bat file that zips up a directory into an archive with the current date & time as part of the name, eg "Code_2008-10-14_2257.zip". Is there any easy way I can do this, independent of the regiona...

How To: Execute command line in C#, get STD OUT results

How do I execute a command-line program from C# and get back the STD OUT results. Specifically, I want to execute DIFF on two files that are programmatically selected and write the results to a text box. Yes, I could figure this out for myself, but surely someone else has done something like it and I'm lazy... ...