I need to write a python script where I need to call several awk commands inside it.
#!/usr/bin/python import os, sys input_dir = '/home/abc/data' os.chdir(input_dir) #wd=os.getcwd() #print wd os.system ("tail -n+2 ./*/*.tsv|cat|awk 'BEGIN{FS="\t"};{split($10,arr,"-")}{print arr[1]}'|sort|uniq -c")
It gives an error on line 8: Syntax Error: unexpected character after line continuation character
Is there any way to get awk command to work in python script? Thanks
source share