New to Linux commands.. What syntax would I use to find and replace a string with each line starting with "Data Centre:" Address information that is different on every line" but ends with the word Site: and I need to keep the site details that follow..
Example:
Input.txt
Data Centre: 23 Mulberry lane, Washington Site: 9067 Green
Expected Output
Site: 9067 Green
I've found gsub examples, but gsub is not available on my OS.
Any help appreciated.
Mac
gawk
(sudo apt install gawk
) on my Ubuntu 16.04 to havegsub
available. – pa4080 Sep 13 '18 at 07:42