Bash shell support?

Riaz Rahaman rahaman.riaz at gmail.com
Tue Aug 29 09:06:34 UTC 2006


thanks for the info,

The ash in the busybox doesn't support arrays, I am using RHEL3, in that I
set my shell to to ash and run the same test case which works fine. I am
trying to find the version of ash by saying ash --version which is not
supported by ash.

If ash doesn't support arrays, then is there any other way that the arrays
can be implemented in the script?

my /bin/sh is mapped to /bin/bash and /bin/ash isn't mapped to /bin/bash

linux at linux:~> ll /bin/sh
lrwxrwxrwx 1 root root 4 May 30 12:13 /bin/sh -> bash
linux at linux:~> ll /bin/ash
-rwxr-xr-x 1 root root 114132 Apr 23 02:09 /bin/ash

I am trying to locate a ash manual which might have this info,I did a man
ash but that it gave me a shell interpreter manual. If anyone has the soft
copy of the ash manual, please forward it to me and if the file size is
large, you can avoid sending to the group, since some folks might not like
getting large files.





On 8/29/06, Juergen Hennerich <juergen at hennerich.eu> wrote:
>
> Riaz Rahaman schrieb:
> > I get all these wierd errors now....I ran the same script on the ash
> > shell on my linux box and they work but when I run the same now on
> > busybox it gives error
> >
> Your memory does not serve you well. The ash shell in busybox (or any
> other ash shell out there) is not able to run that code, because ash
> lacks support for arrays. And if you haven't found a new ash variant
> with array support it is impossible that this code works with ash.
>
> Another possibility is, that your system not only links /bin/sh to
> /bin/bash, but also has a /bin/ash that is a link to /bin/bash. Although
> that wouldn't make sense to me.
>
> Juergen
>
> > ./rwtest: 395: szcache[0+1]=.: not found
> > ./rwtest: 395: szblks[0+1]=13134: not found
> >
> ^^^^^^^ missing array support.
> > for the lines
> >
> > szcache[${#szcache[*]}+1]=$dir
> > szblks[${#szblks[*]}+1]=$blks
> >
> > where $dir is "." and $blks is "13134".
> >
> > When I try to echo the value stored  in the array using the below
> > command, it gives a new error
> >
> > echo 'szcache[${#szcache[*]}+1]':${szcache[${#szcache[*]}+1]}
> >
> >
> > Below is the output log when I run the test case:
> >
> > calling rwtest
> > Files:10%25000:rw-sync-1593
> > calling for loop
> > file:rw-sync-1593
> > dir:.
> > size:10%25000
> > setting typeset
> > n:0
> > n:0
> > szcache:0
> > n is not less than szcache
> > dir:.
> > blks:13134
> > ./rwtest: 395: szcache[0+1]=.: not found
> > ./rwtest: 395: szblks[0+1]=13134: not found
> > max: 25000
> > size:10
> > sz:1313
> > max:25000
> > sz:1313
> > f: 1313b:rw-sync-1593
> > ./rwtest: 397: Syntax error: Bad substitution
> >
> > In the script he does a df -P, but since -P option is not available in
> > my version of busy box I made that as only df with no options.
> >
> > Is there a new scripting language to use for this?
> >
> > Shell experts here can you please help me out....I am stuck on this
> > thing for quite long. This is a test script from the LTP package, I
> > think there might be folks here who have used the LTP package on
> busybox.
> >
> > Looking for your reply asap.....
> >
> >
> > thank you very much for all the help provided so far.
> >
> > Riaz
> >
>



-- 

Regards,
Riaz Ur Rahaman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20060829/b9540f04/attachment-0002.htm 


More information about the busybox mailing list