How to use variable tosearch by zmprov sa

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

How to use variable tosearch by zmprov sa

Postby masoumeh » Wed Jul 11, 2018 11:38 am

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: 578
Joined: Sat Sep 13, 2014 2:04 am
Location: Caracas - Venezuela
ZCS/ZD Version: 8.0.9.GA.6191.UBUNTU12.64 FOSS

Re: How to use variable tosearch by zmprov sa

Postby ccelis5215 » Wed Jul 11, 2018 6:56 pm

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

Postby masoumeh » Sun Jul 22, 2018 6:36 am

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

Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 35 guests