Sunday 27 October 2019

shell - Sed replace line stored in a variable

I need to find a line that starts with mysql.unmetric.twt.url and replace the entire line with line stored in the variable ip.


ip="mysql.unmetric.twt.url=jdbc:mysql://ec2-a-b-c-d.compute-1.amazonaws.com:3306/unmetric? jdbcCompliantTruncation=false&useUnicode=yes&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true"

How can this be achieved using sed?

No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...