I’m not sure what the & after the command in this bash script is doing.
python alt_pg ${args} &
Also the original version of the script that I’m modifying does not use ‘python’ at the start of the command is that something to do with the ‘&’?
No, they’re two separate things.
Running
python alt_pg ...meanspythonwill be looked up in$PATH, andalt_pg ...will be passed as arguments to python. Python then looks for a file namedalt_pg. Runningalt_pg ...meansalt_pgwill be looked up in$PATH. The latter may cause python to run anyway, depending on whatalt_pgdoes.Adding a
&after the command means the command runs in the background, and the shell can continue with commands that follow even whenalt_pgis still running.