Hi,
I m new in the raspberry's world, syntax is very hard for me...
I try to execute an subprocess run function with some variables on a .csv file.
AwkOut=subprocess.run("""["grep", "-ni", "'^\([^;]*;\)\{""" + str(indexcolonne) + """\}""" + Cols[1] + """'", """ + BasedeDonnees + """]""", capture_output=True, text=True, shell=True)
I never found the syntax for it.
Is somebody can help me ?
"Is somebody can help me ?"
To provide a common base for volunteer helpers to understand and help -
What model of RPi board is being used?
What Operating System is it running?
In what Programming Language do you hope "to execute an subprocess run function with some variables on a .csv file."
If you are using the Python language it has a provided library for accessing CSV files. https://docs.python.org/3/library/csv.html
That may need less confusing syntax than trying to use the grep command from the underlying operating system. (Or even awk.)
There may be a Community sub-forum where you can explain - and receive replies - in your own language. viewforum.php?f=90
Statistics: Posted by B.Goode — Sun Jul 20, 2025 2:13 pm