Verify Login Credentials

Previous topic - Next topic

jsquizz

I have a small script that is running an extract process,

$ARSDOC get $MyParams
returnCode=$?
if [ $returnCode -ne 0 ]; then
echo "it didnt work!"
else
echo "it worked!"


A colleague was not in the stash file, and it returned "It worked!" instead of  "It didnt work"

Is there a way that I can verify that a login works, I can add it as a function in my script. Other than using ODWEK.

Thanks in advance
#CMOD #DB2 #AFP2PDF #TSM #AIX #RHEL #AWS #AZURE #GCP #EVERYTHING

Justin Derrick

I suspect you need double braces [[ ]] around comparisons with the -ne operator.  But I'm not sure which shell you're writing in, and they're all a little different and picky about that stuff.

-JD.
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Webinars:  https://CMOD.Training/
IBM CMOD Professional Services: https://CMOD.cloud

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

jsquizz

bash, but ill try that. If thats the fix, shame on me.
#CMOD #DB2 #AFP2PDF #TSM #AIX #RHEL #AWS #AZURE #GCP #EVERYTHING

Justin Derrick

Heh.  I've done worse!  :D

-JD.
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Webinars:  https://CMOD.Training/
IBM CMOD Professional Services: https://CMOD.cloud

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR