command-line

How to add trusted sites to the Application Layer Filter (socket-filter firewall) on Mac OS X using command-line?

Hello, I am trying to add trusted sites to Mac OS X's firewall via command-line. I understand that previously, we were able to use ipfw to configure the firewall on a packet level by using port numbers or IPs. In Leopard (10.5) and on, there is a new feature to add a trusted application to a list. This can be accomplished using the U...

Reading/Capturing DOS input for use in MsBuild

Hi all: How do I capture/read DOS input for use in MsBuild? EDITED for clarification Currently I have 2 files. One batch file, the other is the core.msbuild file which contains the msbuild stuff. I want to be able to capture an extra user input e.g. an output directory, from the windows command prompt (when the build file is execute...

How do I exclude a folder when performing file operations i.e. cp, mv, rm and chown etc. in Linix

How do you exclude a folder when performing file operations i.e. cp etc. I would currently use the wild card * to apply file operation to all, but I need to exclude one single folder. The command I'm actually wanting to use is chown to change the owner of all the files in a directory but I need to exclude one sub directory. ...

How do you input commandline argument in IntelliJ IDEA?

When I input commandline arguments, In Eclipse, using with run configuration. But I don't Know How do i input commandline arguments in IntelliJ IDEA. ...

Running other programs from Java

Hello, I need to run a couple of other programs from my own Java program, basically I need to run these command line statements. svn log --xml -v > svn.log and java -jar example.jar arg1 arg2 and I need to use the text outputs written to the console from these programs in my own program. I've tried Runtime.getRuntime().exec() wit...

Pre-build event command line question.

Hi.I created two applications.(Console Appliaction: MyConApp.exe and Windows Application: MyWinApp.exe) Purpose, Attach MyConApp.exe to MyWinApp.exe and transfer the MyConApp.exe args with the MyWinApp's Pre-build event. [update] MyConApp.exe is a small tool to parse a XSD file and generate a FromXSD.cs file. It worked very vell if i d...

How to output my ruby commandline text in different colours

How can I make the puts commands I output from a commandline based ruby program colour? I would appreciated any references to how I call each different colour also. Lets say we start with this.. Puts "The following word is blue.. Im Blue!" Puts "The following word is green.. Im Green!" Puts "The following word is red.. Im Red!" And I...

Ruby: How to issue CLI commands on Windows

I'm new to Ruby, so this may be a pretty basic question. I have a Windows batch file that I use all the time to interface with my source control system . The batch file issues various command-line commands supported by the source control system's command line interface (CLI). I'd like to write a Ruby program that issues some of these ...

SVN import confusion

I downloaded the SVN source, got it installed and added to my path for easy access. So far, so good. svn --version svn, version 1.6.6 (r40053) compiled Oct 22 2009, 14:13:09 Reading the documentation (that everyone will want to point me to anyway), it instructs me to create a project: svnadmin create tdl Then, to add an unversio...

Merging list problem

Sorry about the bad heading, but the question was not easy to compress into one sentence... I have two lists of contigs (list1 and list2). They contain mostly unique contigs, but with some overlap. I want to compare list1 and list2 and then create a list3 that contains all contigs in list1 minus those also present in list2. Is this poss...

Java exec() does not return expected result of pipes' connected commands

I'm calling command line programs connected by pipes. All this works on Linux for sure. My method: protected String execCommand(String command) throws IOException { String line = null; if (command.length() > 0) { Process child = Runtime.getRuntime().exec(command); InputStream lsOut = child.getInputStream(); ...

Enabling mouse and paste support in command line vim

I've found these two articles http://vimdoc.sourceforge.net/cgi-bin/vimfaq2html3.pl (see 31.13) and http://www.tummy.com/journals/entries/jafo_20060727_145450 But am unfamiliar with basic vim setup. Can anyone help me with a step by step instructions to making mouse usuage in command line mode automatically enabled? (and you will have g...

Set visual studio compile flags to run solution thru' command line

I have a Visual studio solution which I need to run using the command line devenv.exe I need to set the enable C++ exception to SEH and also the linker > System > Subsystem to Console. It will be a console application. Also I need to set a preprocessor flag. I tried doing Set CL=/DTEST_NODE;/EHa;/SUBSYSTEM:CONSOLE Devenv.exe /build...

Parse error when run by cron but not from command line?

So I have a cronjob which executes a PHP script like so: 0 0 * * * /usr/local/bin/php -f /home/mysite/mysite.com/cronjobs/renewal_email.php If I issue the same command from the command line it runs without error and running with the l flag shows no syntax errors. However cron emails the following: Parse error: syntax error, unexpec...

lynx to extract links from web site

how to extract links using lynx the links form anchor tags if there is a link in web i need to extract google.com ...

Java Command Line Jar File

I've created a few .jar files (using Eclipse's export feature), but they were all GUIs. I want to create a .jar file that is strictly command-line; is this possible? ...

Write a cmd line script to parse an xml file

What would be the best solution to check (from the command line with a script), if a certain xml file contains this line: <endpoint uri="endpoint.php" class="flex.messaging.endpoints.AMFEndpoint"/> or this line <!-- <endpoint uri="endpoint.php" class="flex.messaging.endpoints.AMFEndpoint"/> --> and stop execution if the second one ...

How to find duplicate files with same name but in different case that exist in same directory in Linux?

How can I return a list of files that are named duplicates i.e. have same name but in different case that exist in the same directory? I don't care about the contents of the files. I just need to know the location and name of any files that have a duplicate of the same name. Example duplicates: /www/images/taxi.jpg /www/images/Taxi.jp...

Idiots guide to moving a directory up in SVN

No, this is not a duplicate of this. While I'm normally used to using visual tools with SVN, I find myself now faced with wanting to move Repo/Parent/ChildX/ChildY to Repo/ChildY. I receive the following errors and am just looking for what I'm missing here. Consider the server just installed (from a dump), nothing else available but svn...

DOH command-line testing of JavaScript functions outside of the Dojo root

I'm trying to run DOH from dojo-1.3.2 to test simple Javascript functions from command-line. However, I can't seem to get anything to run and the net seems to be devoid of DOH command-line documentation. Ideally the structure I would like is: Tests reside: C:\myproject\tests\ Dojo reside: C:\dojo-1.3.2\util\doh As of right now I've ...