Sunday, 8 September 2013

How to use enternal file as a source of variables for Bash script file?

How to use enternal file as a source of variables for Bash script file?

I am new to Bash scripting and I need help with something.
The file bbb.txt contains many IPv4 and IPv6 addresses, like this:
10.0.2.15 fe80...
192.168.1.1 fe80...
The file aaa.txt has many iptables commands.
I want my script to find all IPv4 addresses in aaa.txt and check if they
can be found in bbb.txt, when matched - IPv4 in aaa.txt is replaced with
IPv6 from bbb.txt. Is it doable?

No comments:

Post a Comment