Following is the script that i have written, with reference of the same file above.
The script is working fine , except for the last perl statement.It is unable to replcae values from $enpasswds variable in the tomcat-users.xml file.
Can anyone let me know , where I went wrong..?
#!/usr/bin/ksh
passwds=`awk -F"\"" '$3 ~ "password="{print $4}' tomcat-users.xml`
for i in $passwds
do
en_passwds=`/opt/coreservices/tomcat-5.5.9/bin/digest.sh -a sha $i`
perl -i.bak -pe's/(password=").*?"/$1$en_passwds"/' tomcat-users.xml
done
It's not allowed to bump up questions. If you bump your thread to the top you're pushing other peoples threads to the board unfairly to the bottom.
Please read our rules.