Re: [ANNOUNCEMENT] shell commands won't run from within a shell script bash version 3.2.9-11

2007-02-14 Thread petermosca

I get a slightly different result:

: command not foundnv

It's as if the "e" in "env" is gobbled up somehow.


Randy-37 wrote:
> 
> When I start the cygwin window I can run commands such
> as env and cd or anything else i have tried.  however when 
> i try to run a shell script with commands inside it, none of
> the commands within the script will execute properly.  
> 
> for instance
> 
> test.sh contains 1 line 
> env
> 
> when it executes the following message is produced:
> 
> : command not found env
> 
> I just did a scratch install today. 
> 
> 
> Thanks,
> 
> Randy Rainwater
> 
> 
> 
> --
> 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/
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/shell-commands-won%27t-run-from-within-a-shell-script-bash-version-3.2.9-11-tf3221512.html#a8971714
Sent from the Cygwin Users mailing list archive at Nabble.com.


--
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/



syntax error near unexpected token `{

2007-02-14 Thread petermosca

Please help if you can.

I am attempting to create a bash script with a function definition. When I
execute the script with the function, I get:

'my_bash_script: line 3: syntax error near unexpected token `{".
'my_bash_script: line 3: `   {

 If I type the function in the command line, it works fine.

My function:

#!/bin/bash
function afunc
   {
  echo $0 $1 $2
   }

afunc one two
-- 
View this message in context: 
http://www.nabble.com/syntax-error-near-unexpected-token-%60%7B-tf3229216.html#a8971939
Sent from the Cygwin Users mailing list archive at Nabble.com.


--
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/