LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Strange script error - any ideas (bash hanging) (http://www.linuxquestions.org/questions/linux-general-1/strange-script-error-any-ideas-bash-hanging-701154/)

bagpussnz 01-30-2009 10:08 PM

Strange script error - any ideas (bash hanging)
 
Hi,
This is on all of my Ubuntu 8.10 machines - but I think it is the version of bash (3.2.39) rather than Ubuntu.
Try the following...

Create a file containing a command, for example ls
echo ls > foo

Make it executable
chmod +x foo

Run it - it will work (as it should).
./foo

Now ssh to your local machine using, (assumes you have openssh-server installed on your local machine).
ssh localhost

Now run the script again. It will hang, taking 100% cpu. Kill it with control-\ (or kill from another console).

You can fix it by putting #!/bin/bash on the first line, but it shouldn't be necessary.

Ideas?

Cheers,
Ian

mrclisdue 01-30-2009 10:29 PM

It worked fine for me - bash version 3.1.17(2)

sry,


All times are GMT -5. The time now is 09:24 PM.