delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/08/02/19:48:26

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3988B3A3.754A9415@veritas.com>
Date: Wed, 02 Aug 2000 16:49:55 -0700
From: Bob McGowan <rmcgowan AT veritas DOT com>
Organization: VERITAS Software
X-Mailer: Mozilla 4.73 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Jonas Jensen <bones0_list AT hotmail DOT com>
CC: Cygwin list <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: Cmd prompt functions missing
References: <20000802232538 DOT 53126 DOT qmail AT hotmail DOT com>

Jonas Jensen wrote:
> 
> I've found the Cygwin bash shell to be a perfect alternative to cmd.exe. However,
> there are some functions missing, or I can't find them:
> 
> start -- launch GUI applications. The argument can be a program, a web site, an
> ftp, a document... anything. I REALLY miss this command.
> 

---deleted stuff, should be able to handle same as the example below---

> I know I could write some of these commands myself, but if they're already hidden
> in there somewhere, I'd like to know. Also, how do you other people live without a
> command like 'start'?

I seldom need it.  But the following script shows how to get it (as well
as the other's).  This is bare bones, but serves to illustrate the idea.

===example script
#!/bin/bash

# Run the single argument via cmd's 'start', in a new window.
# First hack at this, I'm not supporting any of the 'standard' start
# options.

if [[ $# > 1 ]]
then
        echo currently only supports single argument. >&2
        exit 1
fi

# Fix the argument for consumption by Win/DOS
WinForm=$(cygpath -w $1)

# Run cmd.exe to get 'start' funciton, using the argument
cmd /c "start $WinForm"
===end script

-- 
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
rmcgowan AT veritas DOT com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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