I have a plain text file input.txt which looks like:
D000001 D000001 44 1975
D000001 D000408 1 1983
D000001 D000641 1 1977
D000001 D000900 27 1975
I process this file using simple AWK line:
awk '{if ($4 == 1975) print $1,$2,$3}' input.txt
Than I have a Python script which accept file as first command line argument:
#!/usr/bin/env python3
import sys
file_name = sys.argv[1]
print(file_name)
I wonder it is possible to pipe AWK output to Python program as file argument and how to do that?
برچسب:
نویسنده: استخدام کار