pastebin - collaborative debugging tool
blankb.kpaste.net RSS


And Search
Posted by Anonymous on Mon 15th Oct 2018 01:08
raw | new post

  1. perl -ne 'print if (/SPACE/i && /Camp/i )' file.txt
  2.  
  3. cat file.txt | perl -ne 'print if (/SPACE/i && /Camp/i )'
  4.  
  5. cat file.txt | awk 'BEGIN{IGNORECASE=1} /Space/ && /Camp/'
  6.  
  7. cat file.txt | grep -i -E 'Space.*CAMP|Camp.*SPacE'
  8.  
  9.  
  10.  
  11. time (cat file.txt | perl -ne 'print if (/SPACE/i && /Camp/i )')
  12. real    0m0.045s
  13. user    0m0.037s
  14. sys     0m0.013s
  15.  
  16. time (cat file.txt | awk 'BEGIN{IGNORECASE=1} /Space/ && /Camp/' )
  17. real    0m0.043s
  18. user    0m0.029s
  19. sys     0m0.019s

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}





All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at