I got multiple awk errors when tried to use xdg-utils and xdg-settings. For example: $~ xdg-mime query default text/html awk: cmd. line:13: Unexpected token awk: cmd. line:13: Unexpected token awk: cmd. line:13: Unexpected token firefox.desktop After some testing I've found the reason: awk funnction "length" is used without parenthesis which is unsupported by gawk. I've created simple patch to fix this.
Created attachment 498304 [details, diff] awk-length.patch
Please report this to upstream and post the link here to let us track the issue: https://bugs.freedesktop.org/enter_bug.cgi?product=Portland&component=xdg-utils
https://bugs.freedesktop.org/show_bug.cgi?id=104298
Fixed in 1.1.3 which is in portage available. https://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=eda08ef065adac7cfa46f296d378cc06a3131d3e