How to use variable tosearch by zmprov sa

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
masoumeh
Posts: 15
Joined: Sun Nov 05, 2017 7:37 am

How to use variable tosearch by zmprov sa

Post 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
User avatar
ccelis5215
Outstanding Member
Outstanding Member
Posts: 632
Joined: Sat Sep 13, 2014 2:04 am
Location: Caracas - Venezuela
ZCS/ZD Version: 8.8.15.GA.3869.UBUNTU18.64 P12

Re: How to use variable tosearch by zmprov sa

Post 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
masoumeh
Posts: 15
Joined: Sun Nov 05, 2017 7:37 am

Re: How to use variable tosearch by zmprov sa

Post 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
Post Reply