Advertisement
tyler569

sed ex

Mar 30th, 2015
417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. tyler@mac:~ % tail *.txt
  2. ==> a.txt <==
  3. heaveno
  4.  
  5. ==> b.txt <==
  6. heaveno
  7.  
  8. ==> c.txt <==
  9. heaveno
  10.  
  11. ==> v.txt <==
  12. heaveno
  13. tyler@mac:~ % sed -i.backup -e s/heaven/hell/g *.txt
  14. tyler@mac:~ % tail *.txt
  15. ==> a.txt <==
  16. hello
  17.  
  18. ==> b.txt <==
  19. hello
  20.  
  21. ==> c.txt <==
  22. hello
  23.  
  24. ==> v.txt <==
  25. hello
  26. tyler@mac:~ % ls
  27. Applications Dropbox Pictures a.txt.backup c.txt.backup
  28. Desktop Library Public b.txt v.txt
  29. Documents Movies VirtualBox VMs b.txt.backup v.txt.backup
  30. Downloads Music a.txt c.txt
  31. tyler@mac:~ % rm *.backup
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement