grep in pipeline: why it does not work -
i want extract information output of program. method not work. write rather simple script.
#!/usr/bin/env python print "first hello world." print "second" after making script executable, type ./test | grep "first|second". expect show 2 sentences. not show anything. why?
escape expression.
$ ./test | grep "first\|second" first hello world. second also bear in mind shebang #!/usr/bin/env python, not #/usr/bin/env python.
Comments
Post a Comment