From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5055 invoked by alias); 10 Nov 2014 04:24:47 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 5045 invoked by uid 89); 10 Nov 2014 04:24:45 -0000 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 Received: from 24-196-68-46.static.mdsn.wi.charter.com (HELO mrvideo.vidiot.com) (24.196.68.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 10 Nov 2014 04:24:43 +0000 Received: from localhost ([127.0.0.1] helo=mrvideo.vidiot.com) by mrvideo.vidiot.com with esmtp (Exim 4.69) (envelope-from ) id 1XngWw-0003pC-9Q for cygwin@cygwin.com; Sun, 09 Nov 2014 22:24:42 -0600 Received: (from brown@localhost) by mrvideo.vidiot.com (8.13.8+Sun/8.13.8/Submit) id sAA4OfRf014705 for cygwin@cygwin.com; Sun, 9 Nov 2014 22:24:41 -0600 (CST) Date: Mon, 10 Nov 2014 04:24:00 -0000 From: Mike Brown To: cygwin@cygwin.com Subject: Re: how to embed shell script within a .BAT file Message-ID: <20141110042441.GW4678@mrvideo.vidiot.com> References: <0D835E9B9CD07F40A48423F80D3B5A702E8379F0@USA7109MB022.na.xerox.net> <71156572.20141110005807@yandex.ru> <20141110003530.GU4678@mrvideo.vidiot.com> <1119256670.20141110051000@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1119256670.20141110051000@yandex.ru> User-Agent: Mutt/1.5.17 (2007-11-01) X-SW-Source: 2014-11/txt/msg00173.txt.bz2 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@vidiot.com | vidiot@vidiot.net /~\ The ASCII 6082066843@email.uscc.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