pass variable number of arguments to python from shell script

preview_player
Показать описание

Below, you can find the text related to the question/problem. In the video, the question will be presented first, followed by the answers. If the video moves too fast, feel free to pause and review the answers. If you need more detailed information, you can find the necessary sources and links at the bottom of this description. I hope this video has been helpful, and even if it doesn't directly solve your problem, it will guide you to the source of the solution. I'd appreciate it if you like the video and subscribe to my channel!pass variable number of arguments to python from shell script

I have a very simple shell script which accepts 2 arguments after some processing pass these 2 arguments to python code. like below
arg1=$1
arg2=$2
#some processing...

arg1=$1
arg2=$2
#some processing...

Now the requirement is my shell script will accept variable number of arguments and it should pass same to python program. For accepting I can use
for arg in "$@" ; do
#use array for assignments
done

for arg in "$@" ; do
#use array for assignments
done

but issue is how to pass it to python program.

Tags: python,bash,shellSource of the question:

Question and source license information:
Рекомендации по теме