command-line

Passing command line arguments to javaws (Java WebStart) executable.

Hi. Summary for those who might not want to read that much: How do I do this: ? If we could pass ad-hoc command-line args to javaws, then javaws apps could be more like "1st class citizen" "ordinary application". E.g. we could pass filenames of files to be opened. I would like to know if there is a way to pass "ad-hoc" command line arg...

Simple example of batch file and windows scheduler

I need to create a batch file which will copy web log files from a web server to a local desktop box on daily frequency. I'm a web developer, but I'd like to take a stab at learning the process for creating a batch file and I think using the windows scheduler should get me where I need to go. In any case, I'm just looking for a jumping...

Shell script test

I'm tring to update a bash script written by someone else and I've come accross a line I'm not sure about. Can anyone tell me what the following check does: if [ :$RESULT != :0,0 ] I assume it's checking for some value in $RESULT, possibly with a substring? Any help appreciated! ...

Runtime configuration of a project without an IDE

Say i have a java project setup in eclipse. i have all the thirdparty jar's and reading the resources etc set in the eclipse IDE. ie all the classpath etc are set through the IDE Now if i want to launch my app from commandline. Can i get some hints/ links where i can undersand the configuration settings that can be done in Unix / windo...

Starteam shortcut file

Is it possible to create StarTeam shortcut, opening project and overriding working directory? Is it possible to create one StarTeam shortcut, opening several projects at a time? Problem is: I have several solutions, which use the same StarTeam project, and I have to manually change working folder very often (View -> Properties -> Worki...

Want to invoke a linux shell command from Java

I am trying to exec some linux commands from Java code. Actualy the code that I use is useing redirection (>&) and pipe simbols (|). How my Java code should be to be able to invoke that command as in csh or bash. Thanks in advance. P.S. I have used: Process p = Runtime.getRuntime().exec("shell command"); but this code is not OK with...

How to zip specified folders with Command Line

Could you people tell me how to zip specified files into same Zip file. Let me tell how my folders are filled : A task scheduler have backups of my databases and save them into a file daily. It creates 4 database backup daily which means there will be 4 more files daily. So I need to zip newly created backups into same zip file (of cou...

Windows resource editor for Linux

Is there any command line tool for Linux (FreeBSD, etc) which can modify like Resource Hacker versioninfo in exe file? There are some utils for that purpose under Windows, but I'm doing cross-building of Windows Tcl Starpacks on FreeBSD. Of cource it is possible to recompile TclKit with my versioninfo and icons but I don't want to do i...

Win32 C/C++ checking if two instances of the same program use the same arguments

Hello all, I have an application and I want to be able to check if (for instance) two instances of it used the same arguments on execution. To make it clearer: myapp 1 2 myapp 1 3 This isn't a Singleton design pattern problem as I can have more than one instance running. I though about checking the running processes, but it s...

Windows Program: How to snoop on command line arguments?

I am trying to reverse engineer the build system of a commercial Windows based IDE, so I can use make to build my project. A program is launched to perform a task, and I need to know what command line arguments are passed to this program when it is run. However the windows process viewer does not show the command line arguments. Is th...

how to execute and read from a command line during installation of installShield exe

I am new to Install Shield, and i have a really critical requirement. In between the installation steps, the installer should run a clearcase command in the backend and then that command output should be given as an input to the next installer panel. To be more specific, i have to give the user to select a ClearCase storage location of ...

How to I launch a ruby script from the command line by just its name?

On windows, I can run my ruby script like this: > ruby myscript.rb but I want to set things up so that I can just do this instead?.. > myscript.rb How do I do this? I know it's possible because I've recently moved from one PC that had this set up to a new PC that doesn't (yet). ...

Is it possible to retrieve the swf metadata within the actionscript of a flex project?

I know that it is possible to add swf metadata to the compile command as a command option, but I can't find any documentation on how to access these metadata within the actionscript during runtime. We're trying to add a version number to the swf during compile time and then somewhere in our app we would retrieve it during runtime, here i...

How to extract numbers from text file using Windows batch file?

I need to do the following using cmd (Windows command line). I have one file named DDD.CLI026.WK0933.DDDMR45.001.head. The data in file is as follwing (in one long line) HEAD HEALTHDMD Weekly DDD.CLI026 Centocor W200908021012 TRAIL0101 000000000581 00000CKSUM00000223680 I need to extract 581 from 000000000581 and copy it in anoth...

XP command prompt : redirect a file to STDOUT

Hi ! I want to do the opposite of everybody ( laugh ) I start open-erp with a command line like : C:\OpenERPAllInOne\Server>openerp-server.exe --log-file=outputfile but the problem is that with Windows it only does output to a file. Is there any way to redirect a file to the STDOUT. For example (it doesn't work but this is the way I...

Give webservice access to windows service

I am running a webservice on server 2008 that needs access to a windows service and I need to give access to [the user that the web service is running as] via the command line. (sorry if my wording is terrible, hopefully the brackets helped?). I know there is a utility available with the windows 2000 resource kit (SUBINACL.exe), but i...

Checkout a specific revision from subversion from command line

I would like to checkout a specific revision of a folder in subversion using the command line but don't see an option for specifying the revision number in TortoiseProc.exe. TortoiseProc.exe /command:checkout Any ideas on how to get the revision I want? Is TortoiseProc.exe the right tool for what I want to do? Thanks. ...

Java application interacting with the command line.

I am thinking of writing a java application to wrap CVS and some of our other custom build/deploy scripts. This way it will be easy to view status, do a build, publish and deploy without having to type in the commands. What is the easiest way to do this? Offhand I'd guess I have to redirect the output from the command to a String an...

Bash / PHP quoting command line argument

I have a PHP program that uses a Bash script to convert a pdf. However if the filename contains spaces it is not passed through the bash script correctly. How do you escape filenames with spaces within a bash script? Do you have to do something special to quote the filename for the "OUTFILE" variable? Bash script: #!/bin/bash INFI...

Command Line Pipe Input in Java

Here is a simple piece of code: import java.io.*; public class Read { public static void main(String[] args) { BufferedReader f = new BufferedReader(new InputStreamReader(System.in)); while(true) { String x = null; try{ x = f.readLine(); } catch (IOException e) {e.printStackTrace();} System.out.println(x); ...