Advertisement
OldManRiver

Finding GREP calls

Aug 18th, 2016
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  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"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement