Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo "input data" | awk -f script.awk | sort > outfile.txt
- p_awk = subprocess.Popen(["awk","-f","script.awk"],
- stdin=subprocess.PIPE,
- stdout=file("outfile.txt", "w"))
- p_awk.communicate( "input data" )
- import subprocess
- awk_sort = subprocess.Popen( ["-c", "awk -f script.awk | sort > outfile.txt" ],
- stdin= subprocess.PIPE, shell=True )
- awk_sort.communicate( "input datan" )
- awk_sort.wait()
Add Comment
Please, Sign In to add comment