On 11 July 2011 08:08, Michael D. Setzer II <[email protected]> wrote: > On 11 Jul 2011 at 8:47, Laurent Bercot wrote: >> >> Bashisms are arguably Linux-specific extensions to Single Unix, don't >> >> you think ? ;) >> > no, not even close. i dont know why people think "bash == Linux", but >> > it doesnt. it is actively used on many many more systems than just >> > Linux, and i guess i need to point out the fact that bash is far older >> > than Linux. >> >> Okay, then replace "Linux-specific" with "GNU-specific"; as far as I know, >> GNU is still not Unix, *especially in embedded environments that BusyBox >> is targetting*, and bash is still not the reference sh implementation. >> But you have a point. >> >> -- >> Laurent > > As an user, I've got concerns with how scripts work in shells. I've > used checkbashism to try and elimanate them, but don't know if it > finds all of them. I've even run into an issue where bash worked > with a for loop, but after upgrading to a newer version it no longer > worked. > > I've got a project that I took over way back in 2004, and it used > busybox for most things, but did included the full bash to run > scripts? It might work with a busybox shell, but going thru a 2000+ > line script to check for any issues has prompted me to just leave > the 877480 byte bash as part of the iso image. > > Is there a program that can fully check scripts for bashisms or > other problems. >
I don't see how adding bashisms one-by-one to ash is going to help anyone. If you want to run a script under ash, you should write it properly and test it under ash -- which should be faithful enough to the sh spec not to tolerate bashisms. If you have a script that is full of bashisms, the solution is to run it under the intended interpreter: bash. Chris _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
