Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- param(
- [Parameter(Mandatory=$true)]
- [string]$SourceFile,
- [Parameter(Mandatory=$true)]
- [string]$DestFile
- )
- $str1 = @(Get-Content $SourceFile)
- $str2 = @(Get-Content $DestFile)
- Write-Host "Строки из $SourceFile, которые отсутствуют в $DestFile"
- for($i = 0; $i -lt $str1.Count; $i++){
- if ($str2 -notcontains $str1[$i]){
- "[$i]: $($str1[$i])" | Out-Host
- }
- }
- Write-Host "========================================================================"
- Write-Host "Строки из $DestFile, которые отсутствуют в $SourceFile"
- for($i = 0; $i -lt $str2.Count; $i++){
- if ($str1 -notcontains $str2[$i]){
- "[$i]: $($str2[$i])" | Out-Host
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement