I made a python script in which it runs a specified terminal command.
def main(my_list):
for item in my_list:
os.system("myCmd -s {0}".format(item))
item_list = ['itemA', 'itemB', 'itemC']
main(item_list)
As the terminal command I am trying to use does not accepts a list in the -s argument, which is the reason that I make it into a python script.
While running the script, it works but I notice that it will prompts me with the following question:
Are you sure you want to continue (y/n)?
This means I will need to punch in the y on my keyboard, 3 times in the above example.
But in the event if my list is huge, and should I not be on my desk, is there any way that I can script to make it accept 'y' as my answer, without me to press anything on the keyboard?