Re: [wmii] tagging action

From: Chris Foster <foster_AT_physics.uq.edu.au>
Date: Sun, 20 Aug 2006 17:01:37 +1000

> 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