I have *.dot file, for example:
...
0 -> 1 [color=black];
1 -> 2 [color=blue];
1 -> 3 [color=blue];
2 -> 4 [color=gold3];
..
I need to change "color" of lines whose started with $a number. I can easy get =blue
using
a="1"
cat experimental.dot | grep "^$a\ ->" | grep -o =[a-Z0-9]*
But i can't change =blue
to =red
in file using sed.