0

I have a file which containes an decrypted password { KRZ_CONN_PASSWORD=\{AES256:keyfile:a\}9deIfknH7AA3hg+i95mcWg\=\= }, I need to replace it with a new decrypted password which is below

{ KRZ_CONN_PASSWORD=\{AES256:keyfile:a\}UEum+VN9OGFGR/SwTBahgA\=\= }

Actual file:

INSTANCE=s0100r00 [     SECTION=customdefault [ ]       SECTION=default [ { KRZ_ORACLE_HOME=/appl/oracle/s0100r00/product/11.2.0.4 }  { KRZ_CONN_PASSWORD=\{AES256:keyfile:a\}9deIfknH7AA3hg+i95mcWg\=\= }  { KRZ_CONN_USERID=itm6_ag }  ] 

Expected result:

INSTANCE=s0100r00 [     SECTION=customdefault [ ]       SECTION=default [ { KRZ_ORACLE_HOME=/appl/oracle/s0100r00/product/11.2.0.4 }  { KRZ_CONN_PASSWORD=\{AES256:keyfile:a\}UEum+VN9OGFGR/SwTBahgA\=\= }  { KRZ_CONN_USERID=itm6_ag }  ] 
1
  • when you say "decrypted" don't you mean "encrypted" ?
    – Jeff Schaller
    Feb 9, 2017 at 12:01

1 Answer 1

1
sed 's|\({ KRZ_CONN_PASSWORD=\\{AES256:keyfile:a\\}\)[^ ]*|\1UEum+VN9OGFGR/SwTBahgA\\=\\=/g'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .