delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/15/12:43:06

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <5.2.0.9.2.20030215093533.01e6db58@pop3.cris.com>
X-Sender: rrschulz AT pop3 DOT cris DOT com
Date: Sat, 15 Feb 2003 09:42:42 -0800
To: cygwin AT cygwin DOT com
From: Randall R Schulz <rrschulz AT cris DOT com>
Subject: Re: Win 2000 : Open Files With Word & Excel From The Command
Line
In-Reply-To: <3E4E79B1.4040704@mscha.org>
References: <5 DOT 2 DOT 0 DOT 9 DOT 2 DOT 20030214211012 DOT 0294ea38 AT pop3 DOT cris DOT com>
<5 DOT 2 DOT 0 DOT 9 DOT 2 DOT 20030214211012 DOT 0294ea38 AT pop3 DOT cris DOT com>
Mime-Version: 1.0

Michael,

All right, all right. One is enough.

However, your solution is missing quoting of $arg in the "cygstart" 
invocation, and that's a Unix-centric practice we like to discourage 
around here because of the much greater likelihood of failure under Windows.

Also, cygstart resides in the "cygutils" package and that package that 
is not a core Cygwin component, so not everyone has it. From that 
perspective, a pure shell scripting solution is more universal.


Lastly, cygstart did occur to me after I sent my last reply, but I 
didn't feel like further self-flagellation.

Besides, doesn't anybody appreciate a convoluted solution to a simple 
problem any more? Where are all the aspiring Rube Goldbergs of the 
software age?


Randall Schulz


At 09:32 2003-02-15, Michael Schaap wrote:
>On 15-Feb-2003 06:14, Randall R Schulz wrote:
>>Steve,
>>Double damn!
>>Or maybe... Third time's the charm. Yeah, that's it!
>>-==-
>>#!/bin/bash
>>wwArgs=()
>>for arg; do
>>     wwArgs[${#wwArgs[@]}]="$(cygpath -m "$arg")"
>>done
>>exec "/cygdrive/c/Program Files/Microsoft Office/Office/winword.exe" 
>>"${wwArgs[@]}"
>>-==-
>
>Or maybe...
>
>-==-
>#/bin/sh
>
>for arg; do
>     cygstart $arg
>done
>-==-
>
>  - Michael


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019