Rob van der Heij wrote:
What I'm looking for now is an elegant way to suppress the header on
additional columns if there were less than 4 data records... Any
suggestions?
-Rob



Here is something I came up with on Windows using a PowerShell script.

$stem0 = 'Userid   Disk Size',
        '-------- ---- ----',
        'RVDHEIJ  0191   50',
        'MAINT    0193   50'

#         'MAINT    0190  150',
#         'MAINT    019D  102',
#         'MAINT    019E  100'


$pipe = '(end ?) stem stem0'+
  '|pad 18|chop 18'+
  '|d:drop 2'+
  '|join count 3 / /'+
  '|f1:fanout|take 1|chop 10'+
  '|spec a: w1 . set (#0=a-1)'+
  '      /callpipe *.input.1:||dup / 1'+
  '      print (#0) nw'+
  '      /||join / nw'+
  '      print (#0) nw'+
  '      /, ,||*.output.0:/ nw'+
  '|p:pipcmd'+
  '|f2:fanin 0 1'+
  '|cons'+
'? f1:'+
  '|copy'+
  '|not chop 10'+
  '|f2:'+
'? d:|buffer|p:'

run-pipe $pipe

Reply via email to