I am trying to run a bash (or sh) script through a python script like so:
import os
cmd="/bin/echo {1..200000}"
out=os.system(cmd)
However, the command does not run and I get the following error:
/bin/echo: Argument list too long
I want to be able to capture this error specifically in my python script. try/except does not work here as it is not a python error, hence I want to know if there is any other way to capture this.
eval