Video Screencast Help

CCS Unix File content check building

Created: 22 Jan 2013 | 2 comments

I have a check to find whether a specific expression is present in a Unix file.

File contents %~ 'Expression' Where NoOfLinesToReturn = '0' AND File Name (With Path) LIKE 'filepath/filename' with Missing Data Outcome being 'Fail' and Multiple Data Operator being 'AND'

The above logic works fine and does what it should.

Whenever the file contents are not present, the check fails returning the entire file contents text as evidence.

What I am trying to do is to rebuild this check where it will not give me the entire file contents in the evidence field.

I want to see 'Expression' not found instead of the entire contents of the file which is too large.

Any ideas on how this can be achieved?



Comments 2 CommentsJump to latest comment

cmccoy2's picture

I don't think that can be accomplished.  By default the evidence will pull from the value of the field in the expression (i.e. the file contents of the file(s) you are looking at).   I don't think there is a good mechanism using the current check builder to modify or affect the evidence if the check fails.    I will see if I can add this as a feature request and maybe it will get put into a future release.  If you know that the expression you are looking for will be in the first 20 or 30 lines then you might modify the NoOfLinesToReturn = 30.   But I guess you would be taking a risk if the item you are looking for would be further down in the file.  So I guess there is not a good option at this point.

Chaitali's picture

Thanks, cmccoy. I know that the expression which I am looking for can be anywhere in the file. I have a case open with Symantec regarding this one, with a possibility that there will be a patch / HF. The reason I have this requirement of the check is due to the fact that the report breaks when it returns a very large file content for evidence in the failed check - which is by design. And the cell breakage is due to Microsoft excel inability to handle large cell contents. I will post the updates regarding my open case. Thanks, Chaitali