X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Steve Holden <steve@holdenweb.com>
Subject:  Re: How do I make scripts my PC executable
Date:  Thu, 30 Aug 2007 13:29:35 -0400
Lines: 31
Message-ID: <fb6uq2$fa9$1@sea.gmane.org>
References:  <12391292.post@talk.nabble.com> <005801c7eabb$cd519bd0$0a00a8c0@a64x23800p> <46D6462D.1020203@holdenweb.com> <003401c7eb12$1bb53e70$0a00a8c0@a64x23800p>
Mime-Version:  1.0
Content-Type:  text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding:  7bit
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
In-Reply-To: <003401c7eb12$1bb53e70$0a00a8c0@a64x23800p>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

David Christensen wrote:
> I wrote:
>>     $ cat ssh-backup-all.bat
>>     C:\cygwin\bin\bash ./ssh-backup-all
> 
> Steve Holden wrote:
>> Wouldn't it be possible to omit the first two executable lines and
>> have the batch script read
>>     c:\cygwin\bin\bash -l ./ssh-backup-all
> 
> I posted a sample shell session.  The "$ cat ssh-backup-all.bat" is what I typed
> into my shell and the "C:\cygwin\bin\bash ./ssh-backup-all" is the result (e.g.
> the output of the "cat" command; the contents of "./ssh-backup-all").
> 
And I posted alternative content for the batch script that would save 
you from putting two unnecessary lines in the shell script. Or so I thought.

The -l (or --login) option has bash read its usual startup files, 
thereby avoiding the need four the course (".") commands at the 
beginning of the shell script.

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC/Ltd           http://www.holdenweb.com
Skype: holdenweb      http://del.icio.us/steve.holden
--------------- Asciimercial ------------------
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
----------- Thank You for Reading -------------


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

