I would recommend passing a constructed string to 'subprocess.run', then you can print what that string contains -AwkOut=subprocess.run("""["grep", "-ni", "'^\([^;]*;\)\{""" + str(indexcolonne) + """\}""" + Cols[1] + """'", """ + BasedeDonnees + """]""", capture_output=True, text=True, shell=True)
I never found the syntax for it.
Code:
s = """["grep", "-ni", "'^\([^;]*;\)\{""" + str(indexcolonne) + """\}""" + Cols[1] + """'", """ + BasedeDonnees + """]"""print("s =", s)AwkOut=subprocess.run(s, capture_output=True, text=True, shell=True)Code:
s = ["grep", "-ni", "'^\([^;]*;\)\{0\}b'", c]Maybe explain what you want the command to be, provide examples.
Statistics: Posted by hippy — Sun Jul 20, 2025 5:58 pm