I have a simple python script which I'd like to write a shell script to increase a specific value (bearer_id) inside the script incrementally (till a fixed value like 100, 200) and repeat the other lines just as they are (example below). can you please give me some hints/or example of a shell script, on how to do this?
script.py is like:
sgw.add_bearer(dpid=256, bearer_id=1, \
saddr_ingress="10.1.1.10", \
sport_ingress=2152)
Final script should be like this, script.py:
sgwumgt.add_bearer(dpid=256, bearer_id=1, \
saddr_ingress="10.1.1.10", \
sport_ingress=2152)
sgwumgt.add_bearer(dpid=256, bearer_id=2, \
saddr_ingress="10.1.1.10", \
sport_ingress=2152)
.
.#repeat 99 times
.
sgwumgt.add_bearer(dpid=256, bearer_id=100, \
saddr_ingress="10.1.1.10", \
sport_ingress=2152)
p.s: This has to be a separate shell script which I execute it over ssh on the remote machine (which has this python script, ready to execute) then this shell script must either create a new .py file such as I mentioned above or change the existing one in that way for further steps.
Thanks a lot in advance