returns 2 lines, but if I use the following to return only the first value, I only get one answer, but want all of them.
Q: (tuple string item 0 of concatenation ", " of substrings separated by "|" of lines of file "/opt/oracle/scripts/javaversion.info")
A: /opt/oracle/jrmc_backup_R28.2.2
How can I return the first value of each line of the file, separated by |
Yes that works, but I also need to get values retied for second, third as well. Is the tuple property only work on single line of a file like in my example?
The relevance I provided should give the first part of both lines, not just a single value.
Can you provide the output you would like to see?
I just did some further testing, and both options I provided work to return the first value of both lines.
Is this what you were looking for?
concatenations ", " of (tuple string items 0 of concatenation ", " of substrings separated by "|" of it) of lines of files "/opt/oracle/scripts/javaversion.info"
Using the following in an analysis, but not always getting the values I expect, for example:
Q: (tuple string item 0 of concatenation ", " of substrings separated by “|” of it) of lines of file "/opt/oracle/scripts/javaversion.info"
A: /opt/oracle/jrmc_backup_R28.2.2
A: /opt/oracle/jrmc
T: 328
Q: (tuple string item 1 of concatenation ", " of substrings separated by “|” of it) of lines of file "/opt/oracle/scripts/javaversion.info"
A: 1.6.0_29
A: 1.6.0_29
T: 282
Q: (tuple string item 2 of concatenation ", " of substrings separated by “|” of it) of lines of file "/opt/oracle/scripts/javaversion.info"
A: Java™ SE Runtime Environment (build 1.6.0_29-b11)
A: Java™ SE Runtime Environment (build 1.6.0_29-b11)
T: 267
Q: (tuple string item 3 of concatenation ", " of substrings separated by “|” of it) of lines of file "/opt/oracle/scripts/javaversion.info"
A: Oracle JRockit® (build R28.2.2-7-148152-1.6.0_29-20111221-2104-linux-x86_64, compiled mode)
A: Oracle JRockit® (build R28.2.0-79-146777-1.6.0_29-20111005-1807-linux-x86_64, compiled mode)
The item 3 shows two output lines the same, but the file being read in is not…
Q: lines of file "/opt/oracle/scripts/javaversion.info"
A: /opt/oracle/jrmc_backup_R28.2.2|1.6.0_29|Java™ SE Runtime Environment (build 1.6.0_29-b11)|Oracle JRockit® (build R28.2.2-7-148152-1.6.0_29-20111221-2104-linux-x86_64, compiled mode)|
A: /opt/oracle/jrmc|1.6.0_29|Java™ SE Runtime Environment (build 1.6.0_29-b11)|Oracle JRockit® (build R28.2.0-79-146777-1.6.0_29-20111005-1807-linux-x86_64, compiled mode)|
If you are okay with it only having a single result if all results are the same, to simplify reporting, you can do this:
unique values of (tuple string item 1 of concatenation ", " of substrings separated by "|" of it) of lines of file "/opt/oracle/scripts/javaversion.info"