I have the below command that I was running and which was showing as non compliant, in order to make it compliant I need to pass cmd as args in the input.
cmd = f"{script_path} 2>&1 | tee -a {log_file}"
subprocess.Popen(cmd, shell=True)
when i converted the above code to below, the log part wasn't working, please can somebody help.
args = [script_path,"2>&1 | tee -a", log_file ]
subprocess.Popen(args)