-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathcreate-scipts.py
executable file
·24 lines (20 loc) · 1.9 KB
/
create-scipts.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#hhids=['101','2337','1086','1714','1283','252','2814','1202', '871', '1103', '2365', '585', '59', '2755', '2233', '86', '114', '2575', '1700', '974', '1800', '370', '187', '1169', '1718', '545', '94', '2018', '744', '2859', '2925', '484', '2953', '171', '2818', '1953', '1697', '1463', '499', '1790', '1507', '1642', '93', '1632', '1500', '2472', '2072', '2378', '1415', '2986', '1403', '2945', '77', '1792', '624', '379', '2557', '890', '1192', '26', '2787', '2965', '2980', '434', '2829', '503', '2532', '946', '2401', '1801']
#grahamid=['1202', '871', '252', '1103', '2365', '585', '59', '2755', '2233', '1714', '86', '101', '114', '2575', '1700', '974', '1800', '370', '187', '1169', '1718', '545', '94', '2018', '744', '2859', '1086', '2925', '484', '2953', '171', '1283', '2818', '1953', '1697', '1463', '499', '1790', '1507', '1642', '2337', '93', '2814', '1632', '1500', '2472', '2072', '2378', '1415', '2986', '1403', '2945', '77', '1792', '624', '379', '2557', '890', '1192', '26', '2787', '2965', '2980', '434', '2829', '503', '2532', '946', '2401', '1801']
hhids=['1202', '871', '1103', '2365', '585', '59', '2755', '2233', '86', '114', '2575', '1700', '974', '1800',
'370', '187', '1169', '1718', '545', '94', '2018', '744', '2859', '2925', '484', '2953', '171', '2818', '1953',
'1697', '1463', '499', '1790', '1507', '1642', '93', '1632',
'1500', '2472', '2072', '2378', '1415', '2986', '1403', '2945', '77', '1792',
'624', '379', '2557', '890', '1192', '26', '2787', '2965', '2980', '434', '2829',
'503', '2532', '946', '2401', '1801','101','2337','1086','1714','1283','252','2814']
# hhids=[]
# Read in the file
index=0
for id in hhids:
index=index+1
with open('process_hour.sh', 'r') as file:
filedata = file.read()
# Replace the target string
filedata = filedata.replace("2002", id)
# Write the file out again
with open('process{}.sh'.format(index), 'w') as file:
file.write(filedata)