delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/11/09/23:25:04

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:references
:mime-version:content-type:in-reply-to; q=dns; s=default; b=gTUU
XcjjvhqBdQ3XLdh7bSHjjeW3Q+AzE710oitc0MoDjetiCpILoA6xNAJkddEKwPJT
FL3CZqBZuwrafzm6Rmgbergl5NqEmNNRr2AHw0/eQYqP/O0ruQacZepV3DHjyzH1
FbBqov25lFvkDRSQEHYDq4m0M4bFO3TDNWo7Ioo=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:references
:mime-version:content-type:in-reply-to; s=default; bh=bXVWVaBHNs
0m4D6nf1wH7ekD2Os=; b=xAELHo1T3oKJCGtXa2prySwTSejxLvbrGeAOvHyYmw
O3IMZiypkeJh+UJxQJcKne8PflSckKFi/EE/Kp7qThVLOZOjZHl7CY07bjHLu3T5
QlXsT+pbcUeLVfyhQ9NVj4iFRIUd9yRkK9MrlH39O9T+RqnZtGykSV7ZeQQuPaWx
4=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_00,TVD_RCVD_IP autolearn=ham version=3.3.2
X-HELO: mrvideo.vidiot.com
Date: Sun, 9 Nov 2014 22:24:41 -0600
From: Mike Brown <brown AT mrvideo DOT vidiot DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: how to embed shell script within a .BAT file
Message-ID: <20141110042441.GW4678@mrvideo.vidiot.com>
References: <0D835E9B9CD07F40A48423F80D3B5A702E8379F0 AT USA7109MB022 DOT na DOT xerox DOT net> <71156572 DOT 20141110005807 AT yandex DOT ru> <20141110003530 DOT GU4678 AT mrvideo DOT vidiot DOT com> <1119256670 DOT 20141110051000 AT yandex DOT ru>
MIME-Version: 1.0
In-Reply-To: <1119256670.20141110051000@yandex.ru>
User-Agent: Mutt/1.5.17 (2007-11-01)

On Mon, Nov 10, 2014 at 05:10:00AM +0300, Andrey Repin wrote:
> Greetings, Mike Brown!
> 
> >> > I'm tired of creating pairs of script files:  a clickable .BAT file
> >> > to invoke my shell script and then my shell script to do the actual
> >> > work.
> >> 
> >> google: cygwin shell wrapper script
> >> I posted mine in the mailing list not once, and it's not the only available
> >> solution.
> 
> > I'm curious.  Why go through all of what you wrote when all you need to do
> > is execute the shell script?  I'm a Z-shell user and have a bunch of scripts
> > that I run.
> 
> Scripts aren't executed in vacuum. And the question is not limited to SHELL
> scripts.

True.  I do not compile any programs, so anything that I need to run that
is clickable are Windows programs.

> > Maybe the secret is not to try and start a script from within a command prompt.
> > Start cygwin xterms.
> 
> Why? I don't need no friggin xterm, I need to run a script.
> Is this a hard concept to grasp?

It is not, which I how I run my scripts, from an xterm command prompt.
All of my scripts have have input, be it an option and/or file to work on.
That is not easily done if the script were clickable.  Sure, the script
can ask for input, but that adds time to get it running.  Starting it via
the command line saves me lots of time.

I also have scipts that are started via cron.  Options are passed to the
scripts from within the scron configuration file.

> > I have two that I start up after booting the system.
> > The scripts are in my home/bin path, so they are found.
> 
> > It is as simple as that.
> 
> Simple as what?
> I don't understand, what "two" you have and what you are actually doing.

Two xterms that are started by clicking on the shortcut that I created that
points to the BAT file that starts an xterm.

> > It is true that they are not "clickable," but entering the script name in
> > the xterm also allows me to also include parameters/options.
> 
> I don't know the name, I have a script that I want to run. Here. Now. Why
> can't I just click it?

You never have to supply your scripts with options and/or files to deal with?

Entering the script name in the xterm is a lot faster than hunting down the
name in explorer (the file manager) or a shortcut on the desktop.  If you
have a lot of scripts, your desktop can get cluttered real fast.  Mine is
cluttered enough with Windows programs that I use.

I'm and old Unix guy that has grown up with the command line.  I find it
fast to use.  There are those that hate the command line and prefer to
onlty click on something to get it started.

I guess that is where we differ.

I've provided you with an option.  Do with it as you will.

MB
-- 
e-mail: vidiot AT vidiot DOT com | vidiot AT vidiot DOT net            /~\ The ASCII
        6082066843 AT email DOT uscc DOT net (140 char limit)       \ / Ribbon Campaign
Visit - URL: http://vidiot.com/                           X  Against
             http://vidiot.net/                          / \ HTML Email
"What do you say Beckett. Wanna have a baby?" - Castle to Det. Beckett
"How long have I been gone?" Alexis after seeing Castle and Beckett w/ baby
 - Castle - 11/25/13

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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