daily pastebin goal
77%
SHARE
TWEET

Finding GREP calls

OldManRiver Aug 18th, 2016 (edited) 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. In my /Scripts directory I'm trying to read all scripts where I'm calling "grep".  The command I'm using is:
  2.  
  3. locate Scripts | grep \.sh | grep -rinHo "grep"
  4.  
  5. but this is giving me trash.
  6.  
  7. How do I make sure only .sh scripts are read?
  8.  
  9. OMR
  10.  
  11. Also tried:
  12.  
  13. locate /Scripts | grep \.sh | grep -rinHo "grep"
  14. locate /Scripts | grep *.sh | grep -rinHo "grep"
  15. locate /Scripts | grep *\.sh | grep -rinHo "grep"
RAW Paste Data
Top