Script Output Format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi all!

i'm just did a script that the output must be comma separated to be imported into a spreadsheet.

the output that i obteined was

Date/Time,We. Active Threads,W. Total Threads,W. Worker Threads,Name
29-12-10/11:43:01,0,250,0,/FIM
,0,/mytest
,0,/mockofprod/financing/customercentre
,0,/mockofprod/financing/commercial/amt
,0,/account/orderstatus
,0,/activities

as you can see, the first row it's ok, but the second and third, etc etc, are not formated. any ideas of how can i achive this?

NOTE: the first three values are simple commands that i put in order, the fourth and fifth are from a file.

this is part of the code.


printf "%s,%d,%d" $DATE $WSAT $WSTT >> output.${STANZA}.txt

for i in `cat jlist.${STANZA}.txt`
do
  JUNCTION=${i}
  WSWJ=`pdadmin -a sec_master -p ${PASSWD} server task ${STANZA} show ${JUNCTION} | grep 'threads' | awk '{ print $4 }'`
  printf ",%d,%s\n" ${WSWJ} ${JUNCTION} >> output.${STANZA}.txt
done


----------------------------------
Alejandro Rodriguez Luna
Movil: 044-311-112-86-41
----------------------------------

 
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux