Posted By

cshaiku on 06/30/09


Tagged

Bash search perl keyword


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

cshaiku


Perl Keyword Search (One Liner)


 / Published in: Perl
 

URL: http://code.cshaiku.com/code_perl_keyword_search.php

  1. #!/bin/sh
  2.  
  3. tail -n5000 somefile | perl -ne "print $_ if /$1/i && /$2/i && /$3/i && /$4/i && /$5/i;"

Report this snippet  

You need to login to post a comment.