Guest User

Untitled

a guest
Nov 18th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. N104 F1810
  2. N104 F3810
  3. N104 F810
  4. N104 F305
  5.  
  6. enter input
  7. read input
  8. cat file | grep $input
  9.  
  10. N104 F1810
  11. N104 F3810
  12. N104 F810
  13.  
  14. N104 F810
  15.  
  16. grep -E "(^|[^0-9])$input($|[^0-9])" < file
  17.  
  18. $ grep "[[:alpha:]]810" sample.txt
  19. N104 F810
  20.  
  21. $ input=810
  22. $ grep "[[:alpha:]]$input" < sample.txt
  23. N104 F810
  24.  
  25. $ input=104
  26. $ grep "[[:alpha:]]$input" < sample.txt
  27. N104 F1810
  28. N104 F3810
  29. N104 F810
  30. N104 F305
Add Comment
Please, Sign In to add comment