Jean-Marc Lasgouttes wrote: > It would be nice to change our xpms so that this works consistently. I > am not sure though what is the best tool to do that...
A shell script... (probably) sed -n 's/^\( *"[ ]*c *#\)\([0-9]\{4\}\)\([0-9]\{4\}\)\([0-9]\{4\}\) *" *, *$/\1 \2 \3 \4/p' images/font-noun.xpm " c # 0000 0000 0000 So, I can extract the three colours, but how do I left shift em? Ahhh. I could take each \([0-9]\{4\}\) block and split it into two: \([0-9]\{2\}\)\([0-9]\{2\}\) outputting only the first match. Will that do? --