LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-30-2009, 10:08 PM   #1
bagpussnz
Member
 
Registered: Aug 2003
Posts: 51

Rep: Reputation: 15
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
 
Old 01-30-2009, 10:29 PM   #2
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware -current, 14.1
Posts: 1,030

Rep: Reputation: 160Reputation: 160
It worked fine for me - bash version 3.1.17(2)

sry,
 
  


Reply

Tags
bash, hang


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange if statement behaviour when using bash/bash script freeindy Programming 7 08-04-2008 06:00 AM
Bash script shows strange behaviour when started at boot time michael_kaeppler Linux - General 2 05-11-2008 08:37 PM
killing child processes of a bash script results in strange random kills omnio Programming 6 03-12-2007 07:35 AM
A strange bash script kingsyl Linux - Newbie 2 07-13-2004 11:07 PM
strange bash login error figmentium Linux - Newbie 3 08-11-2003 04:27 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration