public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Bash local builtin and redirection problems
@ 2002-09-21 18:04 Ray Pimm
  2002-09-21 19:43 ` Randall R Schulz
  2002-09-21 19:44 ` Michael A Chase
  0 siblings, 2 replies; 4+ messages in thread
From: Ray Pimm @ 2002-09-21 18:04 UTC (permalink / raw)
  To: cygwin

I have successfully installed Cygwin on Windows 2000 SP3. However, when I 
attempt to run a bash shell script that works fine under Linux, two 
problems occur.

1. The bash "local" builtin does not seem to work. Error message is "local: 
not found".

2. Both shorthand formats "&>file" and ">&file" for redirecting standard 
output and standard error do not work. However, the longhand equivalent 
">file 2>&1" does work.

Strangely, both of the above features work from the bash command line (but 
not from a shell script).

Cygwin version is 1.3.12-4.

Bash version is 2.05b-5. An earlier version 2.05a-3 also fails.

Ray


--
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] 4+ messages in thread
* Bash local builtin and redirection problems
@ 2002-09-23  4:20 Ray Pimm
  0 siblings, 0 replies; 4+ messages in thread
From: Ray Pimm @ 2002-09-23  4:20 UTC (permalink / raw)
  To: cygwin

Thanks Randall and Michael

#!/bin/bash instead of #!/bin/sh did the trick!

>Ray,
>
>Were I to guess why "local" and the I/O redirection syntax _appear_ to be 
>missing when your script executes, I'd guess that it's because the 
>script(s) in question begins with this:
>
>#!/bin/sh
>
>Under Cygwin, /bin/sh is Ash, not BASH.
>
>Randall Schulz
>Mountain View, CA USA
>
>
>At 18:00 2002-09-21, Ray Pimm wrote:
>>I have successfully installed Cygwin on Windows 2000 SP3. However, when I 
>>attempt to run a bash shell script that works fine under Linux, two 
>>problems occur.
>>
>>1. The bash "local" builtin does not seem to work. Error message is 
>>"local: not found".
>>
>>2. Both shorthand formats "&>file" and ">&file" for redirecting standard 
>>output and standard error do not work. However, the longhand equivalent 
>>">file 2>&1" does work.
>>
>>Strangely, both of the above features work from the bash command line 
>>(but not from a shell script).
>>
>>Cygwin version is 1.3.12-4.
>>
>>Bash version is 2.05b-5. An earlier version 2.05a-3 also fails.
>>
>>Ray



--
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] 4+ messages in thread

end of thread, other threads:[~2002-09-23  9:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-21 18:04 Bash local builtin and redirection problems Ray Pimm
2002-09-21 19:43 ` Randall R Schulz
2002-09-21 19:44 ` Michael A Chase
2002-09-23  4:20 Ray Pimm

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).