AnsweredAssumed Answered

Any way to make "fmsadmin list clients" output consistent?

Question asked by disabled_ScottKoontz on Dec 13, 2014
Latest reply on Jan 3, 2018 by yodarunamok

Short question

"fmsadmin list clients" does not return the same fixed-field column widths each time. Further, the header and the row data may not have the same column widths.


Any way to format the output, for example use something like UNEXPAND or any other Unix column formatting?



My goal (done except for column parsing) is to have the server produce an active user file every 15 minutes using a script sequence schedule, and then the results are imported into a FileMaker table. Works great, with the exception of sloppy column output. I'm using a Mac Yosemite, so it's possible this does not happen on windows. This happens if the server produces the client list, or if I manually show or create the list in Terminal. Using BASH, and I tried SH. I also tried sending the file as UTF-16. Tried changing to tabs with no luck.


fmsadmin list clients -u username -p password -s

The actual output is much longer (more columns because I'm using -s) and frequently more messy than my two successive runs below.


Client ID User Name Computer Name Ext Privilege

347 rndcadmin rndcadmin’s Mac Profmapp <== indent 1, probably because of quote

620 lc-admin CF07KX1 fmapp

626 Scott Koontz Scott_MacBook_Pro fmapp


Client ID User Name Computer Name Ext Privilege <== change in columns to accommodate long computer name?

347 rndcadmin rndcadmin’s Mac Pro fmapp <== indent 2, why 2 this time?

631 Scott Koontz Scott_MacBook_Pro fmapp

632 MacBookAir2 MacBookAir2’s MacBook Airfmapp <== indent 1



Quoted characters seem to be part of the problem (UTF-8 conversion?), and that seems to hold true most of the time. But depending upon time of run and/or who is logged on spacing can differ. It gets more fun when you use the -s command as with more columns you end up with more crazy.


With lots of tedious calculations (first non-space after 3rd from last semicolon, etc.) I managed to solve after import into FMP, then this a.m. I saw more shifts and more difficulties. Can be further worked in FMP, but it would be nice to have solid data from the start.