Page 1 of 1

How to use variable tosearch by zmprov sa

Posted: Wed Jul 11, 2018 11:38 am
by masoumeh
I need to using "zmprov sa ..." in a script so that the searched string could be variable. I tried below command, but is didn't work!

zmprov -l sa "(zimbraLastLogonTimestamp>=$year$month00000000Z)"

year and month are two variables. They are 2018 and 07

Re: How to use variable tosearch by zmprov sa

Posted: Wed Jul 11, 2018 6:56 pm
by ccelis5215
masoumeh wrote:I need to using "zmprov sa ..." in a script so that the searched string could be variable. I tried below command, but is didn't work!

zmprov -l sa "(zimbraLastLogonTimestamp>=$year$month00000000Z)"

year and month are two variables. They are 2018 and 07


Hi,

Try

Code: Select all

zmprov -l sa "zimbraLastLogonTimestamp>=${year}${month}01000000.000Z"


ccelis

Re: How to use variable tosearch by zmprov sa

Posted: Sun Jul 22, 2018 6:36 am
by masoumeh
ccelis5215 wrote:
masoumeh wrote:I need to using "zmprov sa ..." in a script so that the searched string could be variable. I tried below command, but is didn't work!

zmprov -l sa "(zimbraLastLogonTimestamp>=$year$month00000000Z)"

year and month are two variables. They are 2018 and 07


Hi,

Try

Code: Select all

zmprov -l sa "zimbraLastLogonTimestamp>=${year}${month}01000000.000Z"


ccelis


Thanks