Discussion:
Is there a detailed manual for busybox's ash?
Walter Dnes
2012-06-25 18:36:50 UTC
Permalink
I've got automount (and auto-unmount) working with mdev. Right now,
the code is in a bash script. It's intended for use in Gentoo linux.
But I could see others being interested in it. For maximum portability,
I figure that the script should be in busybox ash. I.e., if you've got
busybox mdev, you have busybox, and therefore busybox ash. I can
imagine that some lightweight systems would try to avoid having another
shell like bash.

I'd like to re-do the automount script in ash, but I don't have any
idea where to find detailed busybox ash syntax documentation. A Google
search for busybox ash documentation turns up... a whole bunch of other
people asking where to find detailed busybox ash syntax documentation<G>

Any pointers?
--
Walter Dnes <waltdnes at waltdnes.org>
Alexander Kriegisch
2012-06-25 19:04:38 UTC
Permalink
?I'd like to re-do the automount script in ash, but I don't have any
idea where to find detailed busybox ash syntax documentation.
I always found the man page of Debian ash to be very helpful and quite precise when doing special shell scripts for my embedded BusyBox environment. Just install a dash package and type "man dash" or read this:

http://linux.die.net/man/1/dash
--
Alexander Kriegisch
Walter Dnes
2012-06-25 22:16:19 UTC
Permalink
Post by Alexander Kriegisch
http://linux.die.net/man/1/dash
Thanks. I now have the automount+autounmount script working under
busybox ash. Turns out I only had one bash-specific feature in the
original script. I'll test it on my home machine for a few days and
then release it. I's intended for the Gentoo mailing list. Would
it be of interest to the busybox list or any wiki it may have?
--
Walter Dnes <waltdnes at waltdnes.org>
Cristian Ionescu-Idbohrn
2012-06-26 07:20:44 UTC
Permalink
Post by Walter Dnes
Post by Alexander Kriegisch
http://linux.die.net/man/1/dash
Thanks. I now have the automount+autounmount script working under
busybox ash. Turns out I only had one bash-specific feature in the
original script. I'll test it on my home machine for a few days and
then release it. I's intended for the Gentoo mailing list. Would
it be of interest to the busybox list or any wiki it may have?
Debian has something called /usr/bin/checkbashisms in a package called
'devscripts'. It's an almost selfcontained perl script. It does what
it says it would. I do use it regulary.


Cheers,
--
Cristian
Douglas Mencken
2012-06-26 14:24:12 UTC
Permalink
I have that checkbashisms.pl script mirrored:

http://ftp.osuosl.org/pub/manulix/scripts/service-scripts/checkbashisms.pl
Yann E. MORIN
2012-06-25 21:27:12 UTC
Permalink
Walter,
Post by Walter Dnes
I've got automount (and auto-unmount) working with mdev. Right now,
the code is in a bash script. It's intended for use in Gentoo linux.
But I could see others being interested in it. For maximum portability,
I figure that the script should be in busybox ash. I.e., if you've got
busybox mdev, you have busybox, and therefore busybox ash. I can
imagine that some lightweight systems would try to avoid having another
shell like bash.
I'd like to re-do the automount script in ash, but I don't have any
idea where to find detailed busybox ash syntax documentation. A Google
search for busybox ash documentation turns up... a whole bunch of other
people asking where to find detailed busybox ash syntax documentation<G>
Any pointers?
ash implements (at least) a POSIX shell. POSIX is defined there:
http://pubs.opengroup.org/onlinepubs/9699919799/toc.htm

The page specific to the shell is:
http://pubs.opengroup.org/onlinepubs/9699919799/toc.htm

The page specific to the shell language is:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18

In any case, I now only use POSIX constructs for shell scripts I intend to
be portable, and/or to be 'embedded'. This (somewhat) guarantees that I can
run the scripts on my desktop machine, and on my embedded system(s), without
having to care about the actual shell ( heck, no, I do not care about csh or
zsh, or any non POSIX-compliant shells :-] )

Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
Continue reading on narkive:
Search results for 'Is there a detailed manual for busybox's ash?' (Questions and Answers)
3
replies
im having linux start up probloms?
started 2011-09-29 08:33:46 UTC
software
Loading...