Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. Grep
  2. =====
  3.  
  4. `-i` - searches for upper && lower cased <br>
  5. `-v word` - searches every row without `word` <br>
  6. `-n` - shows line number of occurence <br>
  7. `-E` - grep on steroids || egrep <br>
  8.  
  9. `grep -i "..cen" GNU` - searches for all ..cen in GNU <br>
  10. `grep "t[wo]o" GPL-3` - searches for too && two in GPL-3, because of [wo], which stands for ||<br>
  11. `grep -i "[^c]en" GNU` - searches for everything '*en' but 'cen'<br>
  12. `grep "^[[:upper:]]" GNU` - searches for all rows which statrts with uppercase letters.<br>
  13. `grep "^[A-Z].*to$" GNU` - searches for string which starts with uppercase letter and end with "to"<br>
  14. `grep -E "GNU|License" GNU` - searches either for 'GNU' or for 'License'<br>
  15. `grep -E "(copy)?right" GPL-3` - searches for right or copyright<br>
  16. `grep -E "a[^[:space:]]+" GNU` - searches for any 'a' begining row without "space"<br>
  17. `grep -E "[AEIOUaeiou]{2}" GNU` - searches for sicuence(size: 2) of vowels<br>
  18. `grep -E "[[:alpha:]]{8,20}" GNU` - searches for words which length is BETWEEN 8 AND 20 <br>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement