I have a file:
$ cat dd.txt
*************************** 1. row ***************************
File: log-bin.00005
Position: 120614936
Binlog_Do_DB:
Binlog_Ignore_DB:
I want only these values from above file log-bin.000055, 120614936
Now I want to update file,position in my slave table.
update db.position set binlog_file='log-bin.000055',position='120614936' where master_host='master.tb.com';
How do I write a simple script for it?
Using
GNU Grepand positive lookbehind:As a script: