> It's spawns lot of processes, but does the job.
>
> this is the worst line
> echo $news | tr "+" "\n" | sort|uniq|tr "\n" "+"|sed "s/^\(.*\)+$/\1/g"
If you're worried about the number of processes you're spawning, I
believe you can replace this line with something resembling
echo "$olds" | egrep "(^|\+)$news(\+|$)" || echo "$olds+$news"
(The sed call above could also be much simplified to sed "s/+$//" )
~Chris.
Received on Sun Aug 20 2006 - 09:01:47 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:13:04 UTC