deeejay

Bash - sed commands

Jun 15th, 2015
523
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.24 KB | None | 0 0
  1. Change multiple values at one time
  2. ===
  3. sed -e 's/up/UP' -e 's/down/DOWN/' some_file.txt
  4.  
  5. Invoke multiple changes using a file
  6. ===
  7. cat > edits.txt
  8. s/up/UP/g
  9. s/one/ONE
  10. s/down/DOWN/g (CTRL+ D to end editing)
  11. sed -f edits.txt some_file.txt
Advertisement
Add Comment
Please, Sign In to add comment