LEAF/LRP shells have always (and apparently) still rather limited in use. During which periods I was writing any shell code I found that you should NEVER ASSUME it will work on the target system.
There are issues due to what shell 'sh' is linked to at a minimum. This is not confined to LEAF/LRP systems, but rather is an extended problem when working with AIX, Solaris, BSD, multi-flavored Linux, anything else. I would assume that the issue is due to interpretation by the shell whether 'sh' is called directly or not. All versions of 'sh' have different behavior with regex. Working from a system that is using 'sh' cross-linked to another shell just borks the idea of interpretation compatibility on occasion. Good luck on someone fixing this, it seems to be extremely low on anyone's priority list. Many of us have succumbed to ugly, dirty code that simply works as intended... accepting this will generally saves a lot of frustration! ;) On Friday 29 February 2008 12:01 pm, Mats Erik Andersson wrote: > Hello again Eric, > > I am beginning to doubt the portability of regular expressions > altogether. A fully grouped pattern seems to be what AIX needs: > > echo -e "abab\nbaab\nabba" | egrep '^((a?[ab])|(ba)){2}$' > echo -e "abab\nbaab\nabba" | egrep '^((ba)|(a?[ab])){2}$' > > If this does not work, AIX stays hopeless! Could it be that > AIX produces a match for > > echo "abaaba" | egrep '^((a?[ab])|ba){2}$' > > which would be honestly terrible. > > Back to the original matter. Following the suggestion > of Charles Steinkuehler, the functionality in validator.sh > is restored when I put the asymmetry to ugly use: > > $THIS(-$THIS){3} ---> ($THIS-){3}$THIS > > (broken) (functional) > > where THIS is similar to > > (r?a|is) > > only that I use ordinary regexes in validator.sh, not the > extended version, although this service is internal to validator.sh. > > As some of you have noticed, I did file a notice with the uClibc > mailing list, so hopefully the matter will be better as the next > beta phase of Bering-uC unrolls. -- ~Lynn Avants Linux Embedded Firewall Project developer http://leaf.sourceforge.net ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ leaf-devel mailing list leaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/leaf-devel