Cleandot: Difference between revisions

From Federal Burro of Information
Jump to navigationJump to search
(Created page with "<pre> #!/bin/sh # rankdir=LR; grep -v provider $1 > $1.tmp mv $1.tmp $1 awk ' /aws_eip/ { gsub( "shape = \"box\"","shape = \"doublecircle\"" ) ; print $0 } \ !/aws_eip...")
 
No edit summary
 
Line 27: Line 27:
sed -i -e 's/aws_network_interface.//g' $1
sed -i -e 's/aws_network_interface.//g' $1
sed -i -e 's/aws_security_group.//g' $1
sed -i -e 's/aws_security_group.//g' $1
sed -i -e 's/aws_sebnet.//g' $1
sed -i -e 's/aws_subnet.//g' $1
sed -i -e 's/module.network.module.//g' $1
sed -i -e 's/module.network.module.//g' $1
grep -v "aws_vpc.vpc" $1 > $1.tmp
grep -v "aws_vpc.vpc" $1 > $1.tmp

Latest revision as of 16:16, 3 October 2016

#!/bin/sh

# rankdir=LR;

grep -v provider $1 > $1.tmp
mv $1.tmp $1

awk ' /aws_eip/ { gsub( "shape = \"box\"","shape = \"doublecircle\"" ) ; print $0 } \
     !/aws_eip/ { print $0} ' $1 > $1.tmp
mv $1.tmp $1

awk ' /aws_network_interface/ { gsub( "shape = \"box\"","shape = \"doublecircle\"" ) ; print $0 } \
     !/aws_network_interface/ { print $0} ' $1 > $1.tmp
mv $1.tmp $1

awk ' /aws_security_group/ { gsub( "shape = \"box\"","shape = \"pentagon\"" ) ; print $0 } \
     !/aws_security_group/ { print $0} ' $1 > $1.tmp
mv $1.tmp $1

awk ' /aws_subnet/ { gsub( "shape = \"box\"","shape = \"parallelogram\"" ) ; print $0 } \
     !/aws_subnet/ { print $0} ' $1 > $1.tmp
mv $1.tmp $1

# aws_route_table
sed -i -e 's/aws_eip.//g' $1
sed -i -e 's/aws_network_interface.//g' $1
sed -i -e 's/aws_security_group.//g' $1
sed -i -e 's/aws_subnet.//g' $1
sed -i -e 's/module.network.module.//g' $1
grep -v "aws_vpc.vpc" $1 > $1.tmp
mv $1.tmp $1