X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Andrew DeFaria Subject: Re: How do I make scripts my PC executable Date: Thu, 30 Aug 2007 08:13:07 -0700 Lines: 33 Message-ID: References: <12391292 DOT post AT talk DOT nabble DOT com> <005801c7eabb$cd519bd0$0a00a8c0 AT a64x23800p> <46D6462D DOT 1020203 AT holdenweb DOT com> <003401c7eb12$1bb53e70$0a00a8c0 AT 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 AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT 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"). I think he was saying that this: $ cat ssh-backup-all.bat C:\cygwin\bin\bash ./ssh-backup-all $ cat ssh-backup-all #! /bin/sh . /etc/profile . /home/dpchrist/.bash_profile ##### do backup stuff could be reduced to this: $ cat ssh-backup-all.bat C:\cygwin\bin\bash -l ./ssh-backup-all $ cat ssh-backup-all ##### do backup stuff -- Andrew DeFaria Cannot find REALITY.SYS. Universe halted. -- 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/