It looks like you have a DOS style file with carriage return/line
feeds at the end where bash is only expecting line feeds.

Run dos2unix on array1.sh

Frank

On Fri, Jun 27, 2008 at 3:10 PM, Darius Jack <[EMAIL PROTECTED]> wrote:
> Thanks.
> Open terminal
> bash  enter
> bash-3.2$
>
> file starts with #!/bin/bash
>
> array1.sh      (bash: array1.sh: command not found
> ./array1.sh     (bash: ./array1.sh: /bin/bash^M: bad interpreter: No such 
> file or "direy"
> bash ./array1.sh
> runs shell script under ash
> interpreting array operations as command not found
>
> Should I really remove ash ?
>
> _____________________________
> followed an advice from InternetTabletTalk
>
> http://www.internettablettalk.com/forums/showthread.php?t=14613
> by
>  ag2  ag2 is offline
> Senior Member
>
> Join Date: Dec 2007
> Posts: 163
> Thanks: 7
> Thanked 96 Times in 32 Posts
> Default [Announce] bash as the default shell
> Tired of the built-in busybox shell?
>
> I've made a package of bash 3.2. Unlike other instances of bash floating 
> around, this one is compatible with busybox and can be used as the default 
> shell without sending your tablet into an infinite reboot cycle.
>
> To make bash the default, edit /etc/passwd and replace /bin/sh with /bin/bash 
> for users 'user' and 'root'
> ________________________________________
>
> and tablet was exactly sent into an inifinite reboot cykle ;(
>
> Darius
>
>
> --- On Fri, 27/6/08, Marius Gedminas <[EMAIL PROTECTED]> wrote:
>
>> From: Marius Gedminas <[EMAIL PROTECTED]>
>> Subject: Re: (update2) Is array implemented in bash ...?
>> To: maemo-developers@maemo.org
>> Date: Friday, 27 June, 2008, 9:09 PM
>> On Fri, Jun 27, 2008 at 07:06:32PM +0000, Darius Jack wrote:
>> > update2
>> >
>> > (I do hope you don't get it htmlized, as Rich Text
>> is disabled)
>> >
>> > Installed bash, run bash in busybox
>>
>> I'm not sure I understand what you mean "run bash
>> in busybox".  Did you
>> mean scratchbox?
>>
>> > code works fine from terminal
>> > unfortunately
>> > trying to run shell file, file.sh
>>
>> How exactly are you running it?
>>
>>   $ ./file.sh
>>
>> should work if file starts with #!/bin/bash
>>
>>   $ bash file.sh
>>
>> should work always, and
>>
>>   $ sh file.sh
>>
>> will use ash to run file.sh.
>>
>> > it is still run by ash shell (not removed yet, as some
>> claimed it may
>> > crash a system)
>> >
>> > so arrays don't work
>> >
>> > #!/bin/bash
>> > doesn't work
>>
>> Could you be more specific?  Do you get a "No such
>> file" error, or do
>> you get errors you usually see when file.sh is executed by
>> ash?
>>
>> Marius Gedminas
>> --
>> Cool. Does it also recode ISO10646-1 pcf files into the
>> funny
>> permutations and subsets used a long time ago in a galaxy
>> far far away
>> on the planets Isolatinus XV and Koiruski VIII ...
>>       -- Markus Kuhn inquires about
>> libXft_______________________________________________
>> maemo-developers mailing list
>> maemo-developers@maemo.org
>> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
> _______________________________________________
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to