when I use encpass from command line : no problem
#!/bin/sh
label=$1
. ./encpass.sh
password=$(get_secret $label)
echo "passw $password
[dbadmin@luechdb61 scripts]$ ./secret.sh dbllud1
passw Vxxxxxxxxxxxxxxxxxxxxxxxx
[dbadmin@luechdb61 scripts]$ ./secret.sh dbllud2
passw Tyyyyyyyyyyyyyyyyyyyyyyyyy
password is correctly retrieved now I call it from another script ......
usr_name=$(echo ${server_name} |cut -d ':' -f3)
echo "handling script_name ${Scr_nme} for server_name : ${srv_name=} dbname : ${db_name} "
. ./encpass.sh
password=$(get_secret ${usr_name})
...
in this case : I also echoed the input and is correct but get_secret does not recognize this and wants to create a new entry although the entry is correctly displayed
[dbadmin@luechdb61 scripts]$ ./db2Deploy.sh -s scr.sql -m deploy.lst -e d
handling script_name scr.sql for server_name : luechdb61 dbname : IEEINT
xdbllud1x <--- echo from script x${usr_name}x
Enter dbllud1:
stty: standard input: Inappropriate ioctl for device
stty: standard input: Inappropriate ioctl for device
what could be the reason for this ? thanks for all answer best regards, Guy