Return single line of Text file analysis

(imported topic written by SystemAdmin)

We currently have an issue with our Riverbed WAN optimisation deployment that some PCs in the field weren’t Syspreped and so have duplicate local SIDs. I’ve tried the property that others have used on this site that checks the Registry but many of our PCs are missing the key in HKLM\security folder. Therefore I can’t rely on this entry.

I’ve decided to use PSGetsid instead to generate the SID on the PC. This reports the results into a text file. Currently the first line of the Text file has garbage info and the second line has the data I require. I’ve cannibalised an analysis I found that returned results on a txt file from an MP3 search and I’m trying to use that to parse the results into BigFix. The analysis is as follows

if (exists file “sid.txt” of parent folder of regapp “besclient.exe” ) then (lines of file “sid.txt” of parent folder of regapp “besclient.exe”) else (“Sid Result not found”)

The issue I want to resolve though is that I only want the second line from the text file. Is it possible for BigFix to return just a single line or does it have to dump the full line?

(imported comment written by Lee Wei)

ShanePlumb,

The relevance to retrieve only line 2 of a a file is:

line 2 of file “sid.txt” of parent folder of regapp “besclient.exe”

(imported comment written by SystemAdmin)

That worked perfectly. I guessed it might be like that but wanted to be sure. Thank you for your assistance