Hi I have the following script which searches a text file for a particular string and outputs the result to another file.

The $string result = "version=123"

Q. Is it possible to seperate the result of the string so only 123 is captured?

Thanks

break on

$TivoliHome = ReadValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lcfd\", "run_dir")
$file="$tivolihome\last.cfg"
$string="lcfd_version"

$found = 0

if open(1,$file) = 0
$line = readline(1)
while @error = 0
if instr($line,$string)
$found = 1
if $found = 1
If Open(5,"\\servername\share$\@wksta.csv",5)=0
$RC=WriteLine(5,"Tivoli Version"+Chr(13)+Chr(10))
$RC=WriteLine(5,"$line,")
$RC=Close(5)
endif
endif

endif
$line = readline(1)
loop
$q=close(1)
endif

exit