Created
September 4, 2015 04:05
-
-
Save damaya/0333e39f540ce9ff5d6f to your computer and use it in GitHub Desktop.
some sed and vim replace queries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Replace only last ocurrence | |
| :s/.*\zsts server thread txn_id txn_time user hostname ip db tbl idx lock_type lock_mode wait_hold victim query// | |
| Replace with seed | |
| sed 's/ts server thread txn_id txn_time user hostname ip db tbl idx lock_type lock_mode wait_hold victim query/<replacewiththis>/g' newdeadlock.log > changedeadlock.log |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
perl -pne 's/(.*)ts server thread txn_id txn_time user hostname ip db tbl idx lock_type lock_mode wait_hold victim query/$1/' deadlock.log > newdeadlock.log