Hi all, don't get over to this neck of the woods much!
Let me preface my post by saying I have absolutely zero experience with UNIX.
However, I need to use this tool: ckjm to analyze some jar files, and it seems to be the only way to do it (I can get it to work with class files from DOS but not jar's).
So, I'm using a tool called cygwin, and it is processing the jar's successfully. BUT, the shell does not hold enough lines to capture all the output, so I am trying the script found on that site to output to XML. Here it is, for easy reference:
Here is how I am using it:
The output is only showing the classname attribute, and omitting all the tags up until </NPM>
Here is an example:
I am sure this is just some syntax problem, but with this being so foreign to me, I don't know where to begin to look (except for tek-tips ;-) )
I would appreciate any guidance anyone has in getting this to work.
Thanks in advance,
Alex
[small]----signature below----[/small]
You can't fit a square data in a round table
Let me preface my post by saying I have absolutely zero experience with UNIX.
However, I need to use this tool: ckjm to analyze some jar files, and it seems to be the only way to do it (I can get it to work with class files from DOS but not jar's).
So, I'm using a tool called cygwin, and it is processing the jar's successfully. BUT, the shell does not hold enough lines to capture all the output, so I am trying the script found on that site to output to XML. Here it is, for easy reference:
Code:
#!/bin/sed -f
1i\
<?xml version="1.0" ?>\
<ckjm>
s/^/<metric><classname>/
s/ /<\/classname><WMC>/
s/ /<\/WMC><DIT>/
s/ /<\/DIT><NOC>/
s/ /<\/NOC><CBO>/
s/ /<\/CBO><RFC>/
s/ /<\/RFC><LCOM>/
s/ /<\/LCOM><Ca>/
s/ /<\/Ca><NPM>/
s/$/<\/NPM><\/metric>/
$a\
</ckjm>
Here is how I am using it:
Code:
$ jar tf lib/derby.jar | c:/db-derby-10.1.1.0-bin/ckjm2xml.bash >derby.xml | java -jar ckjm-1.8.jar
The output is only showing the classname attribute, and omitting all the tags up until </NPM>
Here is an example:
Code:
<metric><classname>org/apache/derby/impl/sql/catalog/TDCacheable.class</NPM></metric>
<metric><classname>org/apache/derby/impl/sql/catalog/TabInfoImpl.class</NPM></metric>
<metric><classname>org/apache/derby/impl/sql/catalog/TableKey.class</NPM></metric>
I am sure this is just some syntax problem, but with this being so foreign to me, I don't know where to begin to look (except for tek-tips ;-) )
I would appreciate any guidance anyone has in getting this to work.
Thanks in advance,
Alex
[small]----signature below----[/small]
You can't fit a square data in a round table