command-line

Building a ASP.NET solution from command-line?

How can I build an ASP.NET web application from the command line? ...

How call .NET command prompt

How to call .NET command prompt from Aspx to Build/Publish another windows application. I have a windows application, that I want to build via my web application (aspx). How can I do that? ...

Compiled FreeImage from source. #include FreeImage.h not found.

I have compiled FreeImage 3.10.0 from source at /lib/FreeImage on Mac OS X 10.6. I can see that after compilation these files were copied: /usr/local/lib/libfreeimage-3.10.0.dylib /usr/local/lib/libfreeimage.a /usr/local/include/FreeImage.h CMake cannot find FreeImage, but I cannot even do #include <FreeImage.h> // not found I am...

What language should I learn to create command line scripts and GUIs?

I am a "self taught" PHP programmer. So I've never taken any Computer Science classes. I've been doing more things via the command line lately and I'd really like to automate this a little more. The problem is, I don't even know where to start. I know PHP. I can create web applications. I know how to do stuff on the command line. But I ...

How to send EOF to Python sys.stdin from commandline? CTRL-D doesn't work.

I am writing to my Python process from the commandline on unix. I want to send EOF (or somehow flush the stdin buffer, so Python can read my input.) If I hit CTRL-C, I get a KeyboardError. If I hit CTRL-D, the program just stops. How do I flush the stdin buffer? ...

Inspiration on how to build a great command line interface

I am in the process of building interactive front-ends to a distributed application which to date has been used to run workloads that had a batch-job like structures and needed no UI at all. The application is mostly written in Perl and C and runs on a mix of Unix and Windows machines, but I think this isn't relevant to the UI. The firs...

How to request Administrator access inside a batch file

I am trying to write a batch file for my users to run from their Vista machines with UAC. The file is re-writing their hosts file, so it needs to be run with Administrator permissions. I need to be able to send them an email with a link to the .bat file. The desired behavior is that when they right-click on the file and say Open, they...

find and replace in multiple files on command line

How do i find and replace a string on command line in multiple files on unix? ...

Is it possible to create a command line JDT application?

I want to create a command line application which does analysis of Java code. The Eclipse JDT seems like the right tool for the job, however every tutorial I can find on the JDT starts up the JDT as an Eclipse plugin. I would expect something like this: public static void main(String[] args) throws Exception { IWorkspace workspace = ...

search and replace a string

is there a way to search and replace a string using single unix command grep recusrsively in multiple directories? i know it can be done by using the combination of find with other utilities like sed perl etc.but is there a way where we can use only grep for doing this on unix command line? ...

Most efficient method to parse small, specific arguments

I have a command line application that needs to support arguments of the following brand: all: return everything search: return the first match to search all*search: return everything matching search X*search: return the first X matches to search search#Y: return the Yth match to search Where search can be either a single keywor...

How to ensure vsvars32.bat has run

I have a build process using MSVC 2005. It only works correctly if run from a Visual Studio command prompt, not from a regular command prompt, because of the additional variables that get set. It's far too easy to run the wrong type of prompt and then get obscure error messages, so I'm trying to avoid this. I don't want to change my regu...

How can you color NAnt output?

We are looking at using NAnt as a deployment tool for our internal (usually web based) applications. One of our (many) current solutions uses colored output on the commandline to indicate if there was a problem with the installation (green and red). Is there an easy way to change the output to be a particular color when NAnt is execu...

Add Jar File to Buildpath in Windows Command Line

Hi Im quite annoyed at having to ask this but I cant get it to work. Currently I have a project with: 5 Classes in the src/ folder 2 JARS named profiles.jar and classifier.jar in the root folder I want to create a "makefile?" or "batch file?" to compile and run these classes FROM THE WINDOWS COMMAND LINE, but first add the ...

Are there any good reference implementations available for command line implementations for embedded systems?

I am aware that this is nothing new and has been done several times. But I am looking for some reference implementation (or even just reference design) as a "best practices guide". We have a real-time embedded environment and the idea is to be able to use a "debug shell" in order to invoke some commands. Example: "SomeDevice print reg xy...

How can I determine if a script was called from the command line or as a cgi script?

I have a script that I wrote that can either be used on the command line or as a CGI script, and need to determine how the script was called so I can output a content-type header for web requests (and maybe some anti-cache headers too). My first thought is to check for the existance of http environment variables: my $js = build_javascri...

Huge performance decline when accessing object in associative PHP array

I'm seeing a huge performance decline in a (command line) PHP script, caused by a simple assignment (runtime increase from 0.8 ~ 0.9 seconds to 29.x seconds). The script first fetches a lot of data from a MySQL database and creates objects of different custom classes. After this fetching (php now uses around 500 MB of RAM) I loop an arr...

search through a range of directories bash script

Hi, I have written (tried to) this small bash script for searching through a range of directories. #!/bin/bash shopt -s nullglob for file in [ac]*/blarg do echo $file done This script searches through directories starting with "a" through "c" for "blarg". It only goes one level deep. How can I make it step through all directori...

create word doc file from linux command line

I have some HTML files that I need to distribute in MS Word doc format (don't ask!). I can manually open each in OpenOffice and then save as a doc file. But I have quite a few files so I want to automate this. Do you know a way? ...

Have ruby Unit::Test speak the results of the test

I've been using the built-in OSX 'say' command to signal the end of long running tests. It's easy and convenient. I'd like to make it speak the last line of the results which says "6 tests, 18 assertions, 0 failures, 0 errors" but still keep the ongoing output. Any ideas how to do this? I've tried: ruby overlay_test.rb | tail -n 1 | ...