Advertisement
Guest User

Untitled

a guest
Apr 15th, 2014
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. [hello] - one
  2. [hello] - two
  3. [hello] - three
  4. [hello] - four
  5.  
  6. one
  7. two
  8. three
  9. four
  10.  
  11. $ awk -F' *- *' '{ print $NF }' << EOF
  12. > [hello] - one
  13. > [hello] - two
  14. > [hello] - three
  15. > [hello] - four
  16. > EOF
  17. one
  18. two
  19. three
  20. four
  21.  
  22. $ sed 's/^[hello] - //' << EOF
  23. > [hello] - one
  24. > [hello] - two
  25. > [hello] - three
  26. > [hello] - four
  27. > EOF
  28. one
  29. two
  30. three
  31. four
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement