#! /usr/bin/ksh
# autoloads for ksh
# these are the ksh functions accessed by this function

#
# Function buildMvAttr: format output in the old style
# i.e. attr-val-1,attr-val-2,attr-val-3, ...
# so function compMvAttr works correctly. This function
# takes several lines of input and builds a single comma
# delimited line of output that matches example line
# above.
#
# Author: Tim Unser

# 1) HP-UX echo cmd does not support -n (no newline after output) option
# 2) At least testLp.tc seems to need itemization within (not above)
#    input line level
# 3) Output from multi-queue pdls -g -r logical-printers-ready cmds 
#    in the latter test requires special care

BMASTART=0
while read inputLine
do
   if [ $BMASTART = 0 ]
   then
      if [ $(uname) = HP-UX ]
      then
         echo "$inputLine\c"
      else
         echo -n $inputLine
      fi
      BMASTART=1
   else
      if [ $(uname) = HP-UX ]
      then
         echo ",$inputLine\c"
      else
         echo -n ','$inputLine
      fi
   fi
done
echo


