Skip to content

Commit

Permalink
Create hoge
Browse files Browse the repository at this point in the history
  • Loading branch information
tamachika authored Aug 20, 2023
1 parent 39bb34e commit 8bc083f
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions hoge
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
f = open('')

p_lid = [[] for i in range(100)]
g_pool = [[] for i in range(100)]
linking = [[] for i in range(10)]
flag=False


#confの文字列が変わったら崩れるプログラムなのがイマイチ
for row in f:
split_row = row.split()
#10.1 lid 99
if "lid" in split_row and "link" not in split_row:
p_lid[int(split_row[2])].append(split_row[0])#lidの番号の位置にpアド「複数」入れる

#pool10 g-address 111.1
if "g-address" in row:
g_pool[int(split_row[0][4:])].append(split_row[2])#poolの番号の位置にgアド

#pool-group 01
if "pool-group" in split_row:
group_num = int(split_row[1])

#Member pool10
if "Member" in split_row:
linking[group_num].append(split_row[1][4:])#group番号の位置にpool番号

#link lid 99
if "link lid" in row:
previous_s_row = split_row
flag=True

#pool-group 01
if flag and "pool-group" in split_row:
for p_ad in p_lid[int(previous_s_row[2])]:
g_pool[int(linking[int(split_row[1])][0])].append(p_ad)
#[g,p,p,p]となる

f.close()



for num in linking:
if num == []:
continue
num = int(num[0])

print("global addressは" + g_pool[num][0] )
for i in range(1,len(g_pool[num])):
print("|private addressは" + g_pool[num][i] )

0 comments on commit 8bc083f

Please sign in to comment.