command-line

How do I use Perl on the command line to search the output of other programs?

As I understand (Perl is new to me) Perl can be used to script against a Unix command line. What I want to do is run (hardcoded) command line calls, and search the output of these calls for RegEx matches. Is there a way to do this simply in Perl? How? EDIT: Sequence here is: -Call another program. -Run a regex against its output. ...

Command Line ( or equivalent) tools for .Net Development

Spending most of my time in Visual Studio and using all the IDE tools. I wish I could spend more time using either of the following. *the Command Window in VS *cmd *cygwin, minGW... *PowerShell. *scripts? What are your favorite and essential commands to type in, opposed to keyboard shortcuts or clicking around? ...

Ffmpeg and Xing header - iTunes issue and Duration issue

Hello all, I extract the audio from a bunch of flv files as an MP3. This works great: ffmpeg -i video.flv -vn -acodec copy audio.mp3 However, some audio that I extract have durations that are longer than they should be and some MP3 files keep looping the audio! Also in some audio players like WMP, the seekbar gets stuck at one point....

Mercurial: multiline commit message on the command line?

How can I specify a multiline commit message for mercurial on the command line? hg commit -m "* add foo\n* fix bar" does not work. The log shows: changeset: 13:f2c6526e5911 tag: tip date: Fri Jan 23 23:22:36 2009 +0100 files: foobar.cpp description: * add foo\n*fix bar ...

VB6 compilation from command line

Anyone knows how to compile a vb6 webclass dll from a command line? I am trying to build a tool for automating version building, but it fails with an 'Compile Error in File '[file name]', Line xxxx : Variable not defined' alert displayed. ...

Windows command for file size only?

Is there a Windows command that will output the size in bytes of a specified file like this? >filesize test.jpg 65212 I know that the dir command outputs this information, but it outputs other information also. I could easily write such a program but I would prefer to use a native Windows command if possible, or only what is availabl...

Comand Line Zipping with Windows

I'm trying to Zip a file through the command line for an SSIS package. I know 7-Zip is a great open source tool to use, but the server I will be deploying too does not have 7-Zip. The only tools I have are the Windows Compress.exe and Compact.exe. However when trying this it seems to create invalid/corrupt zip files. This is what I hav...

Run a Ruby library from the command-line

Hi y'all. I've just learned the basics of Ruby after being very happy with Python for several years (I'm still using Python for some things), but I'd like to know if there's an idiom or hack to solve this particular problem. I have a Ruby script which I'd like to be able to do require script_name with, but I'd also like to be able to ru...

Why can't the Borland C++ Builder 5 command line compiler find my files?

I have a bcb5 project group that I am trying to compile with make.exe. Make seems to run fine and generates a call to bcc32.exe, but that fails. Here is the call to bcc32.exe followed by the error. M:\projects\Project>"D:\Program Files\Borland\CBuilder5\Bin\bcc32.exe" -Od -H=.\obj_files\vcl50.csm -Hc -Vx -Ve -X- -a8 -5 -b- -k- -vi -c ...

How can I pass a filename as a parameter into my module?

I have the following code in .py file: import re regex = re.compile( r"""ULLAT:\ (?P<ullat>-?[\d.]+).*? ULLON:\ (?P<ullon>-?[\d.]+).*? LRLAT:\ (?P<lrlat>-?[\d.]+)""", re.DOTALL|re.VERBOSE) I have the data in .txt file as a sequence: QUADNAME: rockport_colony_SD RESOLUTION: 10 ULLAT: 43.625 ULLON: -97.87527466 LRLAT: 43.5...

Best way to parse command line arguments in C#?

When building console applications that take parameters, you can use the arguments passed to Main(string[] args). In the past I've simply indexed/looped that array and done a few regular expressions to extract the values. However, when the commands get more complicated, the parsing can get pretty ugly. More recently, I built the world...

How do I install a type library to the activex palette via command line for BCB5?

I can import a type library via tlibimp.exe, but when I open up the IDE, the libraries are not in the activex pallete. I can't seem to figure how to get it to install to a particular package either. In the IDE there is an install button in the Import Type Library dialog. How do I do this in the command line? When I look in at the OCX....

BCB5 command line linker (ilink32) can't find consts.obj?

When compiling a makefile with the BCB5 commandline tools, the linker gives me this error: [exec] D:\PROGRA~1\Borland\CBUILD~1\Bin\..\BIN\ilink32 @MAKE0000.@@@ [exec] Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland [exec] Fatal: Unable to open file 'CONSTS.OBJ' [exec] ** error 2 ** deleting lib\paslib.lib I've checke...

Is is possible to compile projects with "IDE-Managed Components" through the command line?

I've been trying to build some huge projects in BCB5 for some time now. I want to use the command line tools because it would cut build time by more than 50% (it already takes 4 hours in the IDE). Often, projects will build just fine in the IDE but fail miserably in the command line. I did some digging and discovered this nice little ...

Using schtasks from the command line, what parameter will wake the computer from sleep and execute the task

The option exists in the UI, but not in the help displayed in the command line. ...

How do I compile a Visual Studio project from the command-line?

I'm scripting the checkout, build, distribution, test, and commit cycle for a large C++ solution that is using Monotone, CMake, Visual Studio Express 2008, and custom tests. All of the other parts seem pretty straight-forward, but I don't see how to compile the Visual Studio solution without getting the GUI. The script is written i...

How do I Interupt a long query in the mysql command line tool without quitting mysql?

While debugging SQL statements, if I accidentally execute a query in using the mysql command line that outputs at lot of results (even if the query itself executes in reasonable time), the only way I know of to stop the endless stream of output is CTRL-C. Unfortunately this puts me back in the shell, forcing me to login and select the ...

Open a new tab in firefox and keep ff in the background

Is the a way to programmatically open a URL in a new tab in firefox without firefox gaining focus? What I found out so far: firefox -new-window <URL> lets ff stay in the background, but opens a new window instead of a tab. firefox -new-tab <URL> opens <URL> in a new tab but gives focus to ff. EDIT: What I'm trying to accomplish is mak...

PowerShell: Can you hook or intercept PowerShell execution of external applications?

I want to do some housekeeping before executing any external console applications (setting some environment vars). In my web research, it looks like overriding NotifyBeginApplication() in $host might do the trick. Unfortunately, I can't figure out how to do that. Here's essentially what I want to do... $host = $host | ` Add-Member ...

Windows equivalent of the Mac OS X “open” command

Liu Chang asked a very similar question to this one here, http://stackoverflow.com/questions/264395/linux-equivalent-of-the-mac-os-x-open-command. Is there a windows equivalent for the Mac OS X "open" command. I'm trying to run a profiler that will open it's results, but it's looking for the "open" command. Basically, the command need...