I just need to return this seg value to shell script. Here's my code:
import os
certificate1=AdminTask.listPersonalCertificates('[-keyStoreName
NodeDefaultKeyStore -keyStoreScope (cell):h1423Cell01:(node):h1423Node01 ]')
temp=certificate1
seg=temp[-16:-5]
print seg
stdout. If you capture that value in your calling script, you're all set.