$bool = Pipe ( <path>, "<$variable>" )
Invokes console based application and populates the result into a variable array.
<path> Path of the console based application.
<$variable> Variable array into which the outcome is populated.
Returns 1 if successful, else returns 0.
$stat = Pipe("c:\Windows\system32\ipconfig.exe","$file")
if $stat == 1
$index = reversefind($file.line.8," ")
if $index != -1
$localip = mid($file.line.8,$index)
- Here, ipconfig.exe is invoked to retrieve the local IP address. The outcome written into the console is directed to a variable array viz., $file.