Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 6800 invoked from network); 21 Jan 2004 02:12:58 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 21 Jan 2004 02:12:58 -0000 Received: (qmail 11403 invoked by uid 500); 21 Jan 2004 02:12:33 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 11375 invoked by uid 500); 21 Jan 2004 02:12:32 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 11349 invoked from network); 21 Jan 2004 02:12:32 -0000 Received: from unknown (HELO web21507.mail.yahoo.com) (66.163.169.18) by daedalus.apache.org with SMTP; 21 Jan 2004 02:12:32 -0000 Message-ID: <20040121021241.92978.qmail@web21507.mail.yahoo.com> Received: from [68.65.180.85] by web21507.mail.yahoo.com via HTTP; Tue, 20 Jan 2004 18:12:41 PST Date: Tue, 20 Jan 2004 18:12:41 -0800 (PST) From: javamz Subject: Re: Problem with command arguments To: Ant Users List In-Reply-To: <20040120154640.22455.qmail@web20418.mail.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-132234844-1074651161=:92855" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --0-132234844-1074651161=:92855 Content-Type: text/plain; charset=us-ascii OK...let me try again....because I really do need to find a solution to this problem. I'm looking for some guidance on how to construct the following commandline: pcli Run -Y Put -prS:\\PVCSCTRL\\APP_JAVA_FW -yf -nv -m"My Description" (This is a subset of the commandline, but it demonstrates the problem that I am having.) Where I am having a problem is constructing the argument: -m"My Description". The command I am attempting to invoke requires the double quotes surrounding the value and will not allow a space after the -m. Can anyone provide me with a code snippet that will construct the command exactly as I have it above. I would greatly appreciate any help someone could provide me. So...here is the code snippet I am using to construct this: commandLine.createArgument().setValue("Run"); commandLine.createArgument().setValue("-Y"); commandLine.createArgument().setValue((getExecutable(PUT_EXE))); commandLine.createArgument().setValue("-pr" + getRepository()); commandLine.createArgument().setValue("-yf"); commandLine.createArgument().setValue("-nv"); commandLine.createArgument().setValue("-m\"" + getDescription() + "\""); Matt Benson wrote: --- javamz wrote: > If I set up -m as a separate argument, then I end up > with a "space" between the -m and the value I am > trying to pass in....PVCS will not accept the space > after the -m. I The thing is, once you start using separate arguments, this should be enough to clarify your intent with regard to embedded spaces. Having worked a little with the PVCS command-line tools, I will say that I agree that -m wants to be part of the same argument as ITS argument: "-mblah" or whatever. When you use single or double quotes at the command line, these are used by the shell to tokenize the arguments to be passed to the executable. When you use separate method calls to construct this, you are doing the job of the quotes right there. So you may find that using an argument like "-mblah blah blah" works. Good luck, Matt __________________________________ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org --------------------------------- Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes --0-132234844-1074651161=:92855--