I want to use a variable and pass it on to shell command line. Problem is. I don't know how. Need help.
def gauti():
imti=tekstas.get("1.0", "end-1c")
subprocess.call("grep -i 'imti' /var/log/syslog > logas.txt", shell=True)
Instead of 'imti' I need a variable that would be delivered in python program to be searched in syslog file.