-2

I tried:

doveadm quota get -u wwe@test.com

In a result i have:

Quota name Type    Value   Limit                                                                    %
User quota STORAGE    16 1906250                                                                    0
User quota MESSAGE     4       - 

How you can see i have number of size of mailbox 16Kb. Ok, but i want to get only this number - 16. I tried:

doveadm quota get -u wwe@test.com | awk '{ print $4 }'

In a result i have

Quota name Type    Value   Limit                        %
16
4

How can i get only 16 without Quota name Type Value Limit %. Please help. Maybe you know other instruments to get value of quota ?

Ed Morton
  • 188,023
  • 17
  • 78
  • 185
Piduna
  • 609
  • 12
  • 28

1 Answers1

0

Probably:

doveadm quota get -u wwe@test.com 2>/dev/null | awk '{ print $4 }'

but MAYBE:

doveadm quota get -u wwe@test.com | awk 'NR>1{ print $4 }'
Ed Morton
  • 188,023
  • 17
  • 78
  • 185
  • sorry, i still have this `Quota name Type Value Limit %` – Piduna Jun 19 '17 at 17:05
  • Then your `doveadm quota get` command is not sending that line to stdout, nor to stderr so you need to read up on it's man page to figure out where it's sending it. To be clear - I have no idea what `doveadm quota get` does or even if part of that is your prompt vs a command. – Ed Morton Jun 19 '17 at 17:07