sys.stdin and re.search

Erik Max Francis max at alcyone.com
Tue Jan 21 01:23:42 EST 2003


Jimmie Fulton wrote:

> # f = os.popen("tail -n+1 --follow=name | tai64nlocal | grep rblsmtpd","r")
	...
> The command I'm issuing on the command line:
> ./rblLogger.py < /var/log/qmail/qmail-smtpd/current | tai64nlocal |
> grep rblsmtpd

These do not do the same thing.

The first behaves like

	something | somethingElse | yetSomethingElse | ./script

but the latter behaves like

	(./script < something) | somethingElse | yetSomethingElse

Redirections (<, >) aren't intermixable with pipes (|) like that.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ To be refutable is not the least charm of a theory.
\__/ Friedrich Nietzsche
    REALpolitik / http://www.realpolitik.com/
 Get your own customized newsfeed online in realtime ... for free!




More information about the Python-list mailing list