The problem is that I can not separate arquivo_novo
from /root/arquivo_novo
, as indicated below. I just need the "new_file" to be able to get into the LOOP IF and the system returns /root/arquivo_novo
and never enters the LOOP IF . I can not consider /root/
because I do not know where the file will be.
>>> subprocess.call(["find / -iname arquivo*],shell=True)
>>> /root/**arquivo_novo**
>>> 0
>>>
>>> subprocess.check_output(["find / -iname arquivo*"],shell=True)
>>> b'/root/**arquivo_novo**\n'