public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Another problem; Bash
       [not found] <20010803113632.28338.qmail@nwcst285.netaddress.usa.net>
@ 2001-08-03 14:45 ` Jason Tishler
  2001-08-03 15:35   ` Sandeep Tamhankar
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Tishler @ 2001-08-03 14:45 UTC (permalink / raw)
  To: mxgl; +Cc: Cygwin

In the future, please post to the Cygwin mailing list instead of sending
private email so others can benefit too.  This is especially true after an
email such as the following:

On Fri, Jul 20, 2001 at 10:46:42PM +0200, mxgl@usa.net wrote:
> Jason Tishler <Jason.Tishler@dothill.com> wrote:
> > Please use Cygwin's setup.exe to install (all of) Cygwin.  Otherwise,
> > it is inappropriate to ask for help on the mailing list.
> 
>   You will probably allow me to use the above remark as a highly        
> instructive illustration of what I would call, to put it mildly, patent
> inawareness of argumentative circularity, if you do not, I will be no less
> thankful for your quick and immediate help, with hindsight, of course, I
> should seriously have weighed alternative options first, before bothering
> You, ... it will never happen again ...

Hmm...

Anyway, on to your most recent problem.

On Fri, Aug 03, 2001 at 01:36:32PM +0200, mxgl@usa.net wrote:
> I have run into another problem, I have been able to pinpoint it, but cannot
> come up with a solution.
> 
> When I write the line "let i=$i+1" into a scriptfile and try to execute it, I
> get the message "let: Not found",

Does the script start with "#! /bin/sh"?  If so, then your problem is
that ash (i.e., /bin/sh under Cygwin) does not support "let".

> if I execute the same file as dotscript ". scriptfile", I get no error
> message,

The above works because bash is processing the script instead of ash
even if it contains the "#! /bin/sh" trigger line.

> it seems no RESERVED WORDS are recognized in scriptfile, if not run as dot
> script,

Not true, other keywords such as "for" are recognized by ash -- just not
"let" (and possibly other bash keywords).

> Is this standard behaviour of bash under cygwin, or is it a problem.

This is standard Cygwin ash behavior and IMO, is not a problem.

Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: 732.264.8770 x235
Dot Hill Systems Corp.               Fax:   732.264.8798
82 Bethany Road, Suite 7             Email: jason@tishler.net
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Another problem; Bash
  2001-08-03 14:45 ` Another problem; Bash Jason Tishler
@ 2001-08-03 15:35   ` Sandeep Tamhankar
  0 siblings, 0 replies; 2+ messages in thread
From: Sandeep Tamhankar @ 2001-08-03 15:35 UTC (permalink / raw)
  To: Jason Tishler; +Cc: mxgl, Cygwin

This is all true; but if you want to use /bin/sh (a.k.a. ash) and run 
the script, change the 'let' line to the following:

i=`/usr/bin/expr $i + 1`

That way, it doesn't matter which shell you're running your script in.

-Sandeep

Jason Tishler wrote:

> In the future, please post to the Cygwin mailing list instead of sending
> private email so others can benefit too.  This is especially true after an
> email such as the following:
> 
> On Fri, Jul 20, 2001 at 10:46:42PM +0200, mxgl@usa.net wrote:
> 
>>Jason Tishler <Jason.Tishler@dothill.com> wrote:
>>
>>>Please use Cygwin's setup.exe to install (all of) Cygwin.  Otherwise,
>>>it is inappropriate to ask for help on the mailing list.
>>>
>>  You will probably allow me to use the above remark as a highly        
>>instructive illustration of what I would call, to put it mildly, patent
>>inawareness of argumentative circularity, if you do not, I will be no less
>>thankful for your quick and immediate help, with hindsight, of course, I
>>should seriously have weighed alternative options first, before bothering
>>You, ... it will never happen again ...
>>
> 
> Hmm...
> 
> Anyway, on to your most recent problem.
> 
> On Fri, Aug 03, 2001 at 01:36:32PM +0200, mxgl@usa.net wrote:
> 
>>I have run into another problem, I have been able to pinpoint it, but cannot
>>come up with a solution.
>>
>>When I write the line "let i=$i+1" into a scriptfile and try to execute it, I
>>get the message "let: Not found",
>>
> 
> Does the script start with "#! /bin/sh"?  If so, then your problem is
> that ash (i.e., /bin/sh under Cygwin) does not support "let".
> 
> 
>>if I execute the same file as dotscript ". scriptfile", I get no error
>>message,
>>
> 
> The above works because bash is processing the script instead of ash
> even if it contains the "#! /bin/sh" trigger line.
> 
> 
>>it seems no RESERVED WORDS are recognized in scriptfile, if not run as dot
>>script,
>>
> 
> Not true, other keywords such as "for" are recognized by ash -- just not
> "let" (and possibly other bash keywords).
> 
> 
>>Is this standard behaviour of bash under cygwin, or is it a problem.
>>
> 
> This is standard Cygwin ash behavior and IMO, is not a problem.
> 
> Jason
> 
> 


-- 
---------------------------------------------
Sandeep V. Tamhankar			
Member of Technical Staff		
Tel: (408) 220-7505
Fax: (408) 774-2002
Email: sandman@interwoven.com

Visit http://www.interwoven.com
Moving Business to the Web	


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-08-03 15:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20010803113632.28338.qmail@nwcst285.netaddress.usa.net>
2001-08-03 14:45 ` Another problem; Bash Jason Tishler
2001-08-03 15:35   ` Sandeep Tamhankar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).