command-line

How do I recognize command-line parameters in my Delphi program?

I plan to run specific application commands every X days using Task Scheduler. Do I have to write support for command-line parameters first, so Scheduler can execute it? If so, does anyone know any good command-parameter components? ...

How to output lines 800-900 of a file with a unix command?

I want to output all lines between a and b in a file. This works but seems like overkill: head -n 900 file.txt | tail -n 100 My lack of unix knowledge seems to be the limit here. Any suggestions? ...

Looking for recommendations on a good ** beginners ** bash tutorial

Hi, I am an ETL developer by profession that just started reading The Pragmatic Programmer by Dave Thomas & Andrew Hunt. I have been meaning to learn more about bash & command line in Ubuntu for a while but reading this book made me realize how essential it is for me to start learning it. Therefore, I would love to get some recommendati...

How do I specify a file to pass to a java process run by an Ant task?

I have an Ant task to call a java process that takes a file on the command line. I can pass the file directly to the java program but I can't figure out how to make Ant take the file on the command line. Here's what I've got: <target name="FileProcessor" description="Process a specified file"> <run-standalone name="CheckClearer" ma...

How do I create a new Firebird database from the command line?

I'd like to create a new Firebird database in my C# client application. Is there a command line utility that lets you do this? ...

Apache Ant command line arguments without double quotes - is it possible?

Today I had to add a task to an Apache Ant file. The command line should have been something like myprogram --param1 --param2 path\somefile 2> path\logfile The problem with this was that if I used something like the following for this <exec executable="$(myprogram)" <arg value="--param1"> <arg value="--param2"> <arg path="$(som...

How do you run a single query through mysql from the command line?

I'm looking to be able to run a single query on a remote server in a scripted task. For example, intuitively, I would imagine it would go something like: mysql -uroot -p -hslavedb.mydomain.com mydb_production "select * from users;" ...

Mathematica in batch mode from the command line on Mac OS X

I'd like to start writing some unit tests for my Mathematica programs and control everything from the command line with some Makefiles. It seems like Mathematica can be run from the command line but I can't see any basic instructions on getting started with doing this on Mac OS X — has anyone done this before? Update: Creating a te...

command line to create data source with sql authentication?

I'm looking to run a batch file on windows xp professional which creates a system odbc data source for a sql server connection. I can do that with: ODBCCONF.exe CONFIGSYSDSN "SQL Server" "DSN=Kappa| Description=Kappa Data Source | SERVER=10.100.1.10 | Trusted_Connection=Yes | Database=subscribers" However I need a way to set the sql ...

Natural language command language

I'm interested in developing a natural language command language for a domain with existing rules. I was very impressed when Terry Winograd's SHRDLU showed the way (the conversation below is 40 years old! Astonishing). Can we do better now and if so where can I get examples? Person: Pick up a big red block. Computer: OK. Person: ...

Linux diff and patch command line utilities for MySQL data (not structure)

I have two MySQL databases and I would like to write a script to compare and update data changes between them. Does anyone know a Linux command line tool for diffing or patching data in MySQL databases? ...

How do I add/update a property inside an MSI from the command-line?

I have an MSI installer in which I need to add or modify a short text property from the command-line. This has to be done after the installer is built; I cannot modify the process that produces the installer in the first place. It also has to be executed headless from a script. When I say "property," it could be an MSI property, a val...

How to create an application in IIS using command line ?

What would be the equivalent, by command line, of the create button in the Home Directory tab in IIS 6.0 ? (Used to create an application on a directory). Edit : I already know of iidvdir. Unfortunalety, it doesn't seem to work the way I want it to (or I dont use it properly). Let's say that I have a website called Website for witch the...

Catching Ctrl+C in Java

Is it possible to catch the Ctrl+C signal in a java command-line application? I'd like to clean up some resources before terminating the program. ...

PHP command-line: How do I read in a typed-in password without displaying the typed chars on the console?

I want to read in a password as part of a command-line script, but do not what the typed password to appear on the screen. This seems to be a fairly common feature in command-line apps, but my Google-fu has failed in identifying how this works. Is it a feature of the OS? Do you have to intercept the input stream somehow so it doesn't wri...

Ruby Command Line: How can I send the CTRL-C command via text in the command line?

Hi, I am trying to create a simple Automator droplet that will take the style.less file dropped into it and run the following LESS command on it: $ LESSC {DROPPED_FILE} --watch which will monitor the file I have dropped in for any changes and will then automatically update the outputted style.css FYI: I am using LESS to have dynamical...

Using google as a dictionary lookup via bash, How can one grab the first definition?

#!/bin/bash # Command line look up using Google's define feature - command line dictionary echo "Type in your word:" read word /usr/bin/curl -s -A 'Mozilla/4.0' 'http://www.google.com/search?q=define%3A+'$word \ | html2text -ascii -nobs -style compact -width 500 | grep "*" Dumps a whole series of definitions from google.com an examp...

batch file for configuring my network setings

i want to write a batch which will have the same effect as follows. Here's what I do manually (which I want to program to do automatically): 1) START -> Run -> cmd (get command prompt) 2) ipconfig /release 3) START -> Connect to -> Show all connections 4) Right-click "Local Area Network" and click "Properties" 5) Highlight "Internet Pro...

Can I turn on extended regular expressions support in Vim?

The characters for extended regular expressions are invaluable; is there a way to turn them on so that I don't have to escape them in my Vim regex, much like the -E flag I can pass to grep(1)? ...

Calling main method from another application

I'm writing a wrapper application that will be used to provide an abstraction layer around an existing application that is currently called from the command line. How would I go about calling the main method in the existing app from within my wrapper app? ...