MESSLY:
mail address: ubuntu://basics:password@host:1521/oracle
directory_name: common setup
directory: /u11/dodge
mail_server: mailnetwork
my_homedir: /home/lucifer
logic_path:
error_path:
mail_id:
- xxxyyy@mail.com
Above is my config file. I am trying to change the password in this config file through shell script. The cmd I'm using is
cat file_name.txt | grep "my_homedir" | grep -v "#" | awk '{FS=":";print $2}' |grep -B4 -w "$my_homedir" file_name.txt | grep -o -P '(?<=//).*(?=@)' | cut -d ":" -f2
The following cmd will give output as **password**.
Now I need to change the password to another password In the same pipe.
Could someone please guide me?
expected output :
MESSLY:
mail address: ubuntu://basics:new_passwd@host:1521/oracle
directory_name: common setup
directory: /u11/dodge
mail_server: mailnetwork
my_homedir: /home/lucifer
logic_path:
error_path:
mail_id:
- xxxyyy@mail.com