scripts/rename-graphs
author deba
Wed, 12 Dec 2007 13:35:55 +0000
changeset 2541 e67ec65747fa
parent 2532 06495c0e12f5
child 2552 5f711e4668f5
permissions -rwxr-xr-x
Bug fix
deba@2531
     1
#!/bin/bash
deba@2531
     2
deba@2531
     3
ID=$RANDOM
deba@2531
     4
deba@2531
     5
cat $1 | \
kpeter@2536
     6
sed -e "s/bipartite undirected graph/bipartite graph/g"\
kpeter@2532
     7
	-e "s/undirected edge/_ed_ge_label_/g"\
deba@2531
     8
	-e "s/UGraph/_Gr_aph_label_/g"\
kpeter@2532
     9
	-e "s/uGraph/_gr_aph_label_/g"\
kpeter@2532
    10
	-e "s/ugraph/_gr_aph_label_/g"\
kpeter@2532
    11
	-e "s/Graph/_Digr_aph_label_/g"\
deba@2531
    12
	-e "s/graph/_digr_aph_label_/g"\
deba@2531
    13
	-e "s/UEdge/_Ed_ge_label_/g"\
kpeter@2532
    14
	-e "s/uEdge/_ed_ge_label_/g"\
deba@2531
    15
	-e "s/uedge/_ed_ge_label_/g"\
deba@2531
    16
	-e "s/Edge/_Ar_c_label_/g"\
deba@2531
    17
	-e "s/edge/_ar_c_label_/g"\
deba@2531
    18
	-e "s/ANode/_Re_d_label_/g"\
deba@2531
    19
	-e "s/BNode/_Blu_e_label_/g"\
deba@2531
    20
	-e "s/A-Node/_Re_d_label_/g"\
kpeter@2532
    21
	-e "s/B-Node/_Blu_e_label_/g"\
deba@2531
    22
	-e "s/anode/_re_d_label_/g"\
deba@2531
    23
	-e "s/bnode/_blu_e_label_/g"\
deba@2531
    24
	-e "s/aNode/_re_d_label_/g"\
deba@2531
    25
	-e "s/bNode/_blu_e_label_/g"\
kpeter@2532
    26
	-e "s/_Digr_aph_label_/Digraph/g"\
kpeter@2532
    27
	-e "s/_digr_aph_label_/digraph/g"\
kpeter@2532
    28
	-e "s/_Gr_aph_label_/Graph/g"\
kpeter@2532
    29
	-e "s/_gr_aph_label_/graph/g"\
deba@2531
    30
	-e "s/_Ar_c_label_/Arc/g"\
deba@2531
    31
	-e "s/_ar_c_label_/arc/g"\
deba@2531
    32
	-e "s/_Ed_ge_label_/Edge/g"\
deba@2531
    33
	-e "s/_ed_ge_label_/edge/g"\
deba@2531
    34
	-e "s/_Re_d_label_/Red/g"\
deba@2531
    35
	-e "s/_Blu_e_label_/Blue/g"\
deba@2531
    36
	-e "s/_re_d_label_/red/g"\
deba@2531
    37
	-e "s/_blu_e_label_/blue/g"\
deba@2531
    38
> rename_graphs_temp_file_$ID.tmp
deba@2531
    39
deba@2531
    40
mv rename_graphs_temp_file_$ID.tmp $1