136667ED ap1_01_a_ap1_01_rails_07
035B337C ap1_01_a_arrows_005
79546F82 ap1_01_a_centreline_010
0E1D31E7 prop_bush_med_02
136667ED -1294.6945,-2376.0317,21.8279
035B337C -1314.6719,-2721.7378,12.9467
79546F82 -1283.1066,-2529.9771,12.9635
0E1D31E7 1919.4160,-1814.3889,160.5210
0E1D31E7 1919.9885,-2628.2529,0.7537
0E1D31E7 192.0235,-2603.1790,4.9978
0E1D31E7 192.1050,4950.3540,389.4736
136667ED -1294.6945,-2376.0317,21.8279 136667ED ap1_01_a_ap1_01_rails_07
035B337C -1314.6719,-2721.7378,12.9467 035B337C ap1_01_a_arrows_005
79546F82 -1283.1066,-2529.9771,12.9635 79546F82 ap1_01_a_centreline_010
0E1D31E7 1919.4160,-1814.3889,160.5210 0E1D31E7 prop_bush_med_02
0E1D31E7 1919.9885,-2628.2529,0.7537 0E1D31E7 prop_bush_med_02
0E1D31E7 192.0235,-2603.1790,4.9978 0E1D31E7 prop_bush_med_02
0E1D31E7 192.1050,4950.3540,389.4736 0E1D31E7 prop_bush_med_02
param(
[string]$Input1,
[string]$Input2,
[string]$Output,
[int]$Index)
# Read in the file content
#unique entry file
$file1 = Get-Content -Path $Input1
#multiple instances
$file2 = Get-Content -Path $Input2
# create an empty array to hold the merged data
$merged = @()
# Index should start at 1, but we need to normalize it since arrays start at...
param(
[string]$Input1,
[string]$Input2,
[string]$Output,
[int]$Index)
# Read in the file content
#unique entry file
$file1 = Get-Content -Path $Input1
#multiple instances
$file2 = Get-Content -Path $Input2
# create an empty array to hold the merged data
$merged = @()
# Index should start at 1, but we need to normalize it since arrays start at 0
if ($index -eq $null)
{
$index = 0
} else
{
$index--
}
ForEach ($line In $file2)
{
$parsedLine = $line.Split(' ')
ForEach ($uniqueLine In $file1)
{
$parseUniqueLine = $uniqueLine.Split(' ')
If ($parsedLine[$index] -ieq $parseUniqueLine[$Index])
{
$merged = $merged + @("$parseUniqueLine `t$parsedLine")
break
}
}
}
Out-File -InputObject $merged -FilePath $output