Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!bionet!ames!pacbell!pb2esac!pttesac!mavanamm From: mavanamm@pttesac.UUCP (Marnix van Ammers) Newsgroups: comp.unix.wizards,pb.unix Subject: ksh88 problem with substring expansion using "+( )" pattern Keywords: KSH88 SUBSTRING PATTERN Message-ID: <1426@pttesac.UUCP> Date: 17 Oct 89 23:39:08 GMT Followup-To: comp.unix.wizards Organization: Pacific*Bell ESAC, San Francisco, Ca. Lines: 17 I can't believe that the following ksh substring expansion should take *22* seconds on my sun 3/50 (34 seconds on our 3B20A). All the work is done internal to ksh. I'm using ksh88b (the "+( )" pattern requires ksh88). x=$(set -o) # Set x to current option settings xx="${x##*nolog+( )on}" # same as `echo "$x"|sed "s/.*nolog *on//"` As long as the above takes, I could do about 40+ forks and execs of sed. I've found better ways of doing what I wanted to do without any system calls, but I still can't believe 22 seconds. Anybody know what's going on? -- Marnix