ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/proc/self/root/usr/lib64/python2.7/Tools/scripts/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/proc/self/root/usr/lib64/python2.7/Tools/scripts/rgrep.pyo

�
�fc@sYdZddlZddlZddlZd�Zdd�ZedkrUe�ndS(s.Reverse grep.

Usage: rgrep [-i] pattern file
i����NcCsAd}d}tjtjdd�\}}x0|D](\}}|dkr2|tjB}q2q2Wt|�dkr}td�nt|�dkr�td	�n|\}}ytj||�}Wn*tjk
r�}	td
t	|	��nXyt
|�}
Wn6tk
r3}	tdt|�t	|	�fd�nX|
j
dd�|
j�}d}x�|dkr<t||�}
||
}|
j
|�|
j|
�}|jd�}~|dkr�|d
s�|d
=q�n|d
||d
<|dkr|d}|d=nd}|j�x%|D]}|j|�r|GHqqWqYWdS(Ni@iiitis-iisnot enough argumentss"exactly one file argument requiredserror in regular expression: %sscan't open %s: %ss
i����i(tgetopttsystargvtret
IGNORECASEtlentusagetcompileterrortstrtopentIOErrortreprtseekttelltNonetmintreadtsplittreversetsearch(tbufsizetreflagstoptstargstotatpatterntfilenametprogtmsgtftpostleftovertsizetbuffertlinestline((s+/usr/lib64/python2.7/Tools/scripts/rgrep.pytmainsR

'







icCs'tjt_|GHtGHtj|�dS(N(Rtstderrtstdoutt__doc__texit(Rtcode((s+/usr/lib64/python2.7/Tools/scripts/rgrep.pyR9st__main__(R*RRRR'Rt__name__(((s+/usr/lib64/python2.7/Tools/scripts/rgrep.pyt<module>s	-

Zerion Mini Shell 1.0