Hi Mats Just out of curiosity I tested your code
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> on AIX >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # #!/bin/sh # # lager=/tmp/tillf # # { > echo -e "abab\nbaab\nabba" | egrep '^(a?[ab]|ba){2}$' > echo -e "abab\nbaab\nabba" | egrep '^(ba|a?[ab]){2}$' > } > $lager # | tee $lager # # echo "$(wc -l < $lager) matches out of intended 6." 4 matches out of intended 6. # cat $lager baab abba baab abba >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On a SuSE 10.0 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> [EMAIL PROTECTED]:~> echo "$(wc -l < $lager) matches out of intended 6." 6 matches out of intended 6. [EMAIL PROTECTED]:~> cat $lager abab baab abba abab baab abba >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Bering 1.2 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> greatwall: -root- # echo "$(wc -l < $lager) matches out of intended 6." 5 matches out of intended 6. greatwall: -root- # cat $lager abab abba abab baab abba >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Bering 3.x >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> gatekeeper# #!/bin/sh gatekeeper# gatekeeper# lager=/tmp/tillf gatekeeper# gatekeeper# { > echo -e "abab\nbaab\nabba" | egrep '^(a?[ab]|ba){2}$' > echo -e "abab\nbaab\nabba" | egrep '^(ba|a?[ab]){2}$' > } > $lager # | tee $lager gatekeeper# gatekeeper# echo "$(wc -l < $lager) matches out of intended 6." 5 matches out of intended 6. gatekeeper# cat $lager abab abba abab baab abba In this selection the only system which interprets your code 'right' is a fully blown linux. Mind you, Bering 1.2 has a sed binary as does AIX. I guess your code is not very portable then :-( cheers Erich ------------------------------------------------------------------------- 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