Author Topic: Verify Login Credentials  (Read 40 times)

jsquizz

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 404
    • View Profile
Verify Login Credentials
« on: October 12, 2020, 12:47:01 PM »
I have a small script that is running an extract process,

Code: [Select]
$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
#AIX #CMOD #DB2 #TSM #XENOS #AFP2PDF #MIGRATION #TROUBLESHOOT

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 1928
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Verify Login Credentials
« Reply #1 on: October 13, 2020, 04:59:28 AM »
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.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

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

jsquizz

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 404
    • View Profile
Re: Verify Login Credentials
« Reply #2 on: October 13, 2020, 09:52:53 AM »
bash, but ill try that. If thats the fix, shame on me.
#AIX #CMOD #DB2 #TSM #XENOS #AFP2PDF #MIGRATION #TROUBLESHOOT

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 1928
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Verify Login Credentials
« Reply #3 on: October 14, 2020, 10:14:51 AM »
Heh.  I've done worse!  :D

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

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