I have a list file which contains:
1.1.1.1:50
1.1.1.2:60
1.1.1.3:70
I am trying to make two variables and execute an internal application to hash the first column with the second one. What I did is these loops, but they give me 9 possibilities and I need only three:
This is my script
#!/bin/bash
for a in $(cat list | cut -d ":" -f 1 )
do
for b in $(cat list | cut -d ":" -f 2 )
do
echo $a,$b # this is example
done
done