comparacion_de_archivos_de_texto_con_python_y_powershell
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| comparacion_de_archivos_de_texto_con_python_y_powershell [2024/10/17 21:42] – external edit 127.0.0.1 | comparacion_de_archivos_de_texto_con_python_y_powershell [2025/09/05 16:09] (current) – oso | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Comparación de Archivos de Texto con Python y PowerShell ====== | ====== Comparación de Archivos de Texto con Python y PowerShell ====== | ||
| + | ===== Comparación por hash ===== | ||
| - | Este documento | + | |
| + | <code powershell> | ||
| + | $path = " | ||
| + | |||
| + | $cert1 = Join-Path $path " | ||
| + | $cert2 = Join-Path $path " | ||
| + | |||
| + | $hash1 = Get-FileHash $cert1 -Algorithm SHA256 | ||
| + | $hash2 = Get-FileHash $cert2 -Algorithm SHA256 | ||
| + | |||
| + | if ($hash1.Hash -eq $hash2.Hash) { | ||
| + | Write-Output "Los certificados son idénticos (hash SHA256 coincide)." | ||
| + | } else { | ||
| + | Write-Output "Los certificados son diferentes." | ||
| + | Write-Output " | ||
| + | Write-Output " | ||
| + | } | ||
| + | |||
| + | </ | ||
| + | |||
| + | A continuación se describe cómo comparar dos archivos de texto que contienen parámetros y valores similares usando Python y PowerShell. El resultado será un archivo HTML con tres columnas: `Parámetro`, | ||
| ===== Python ===== | ===== Python ===== | ||
comparacion_de_archivos_de_texto_con_python_y_powershell.txt · Last modified: 2025/09/05 16:09 by oso
