Comparing arrays
Array comparison, although fun, can seem to be a little bit of a technical overkill to implement using programming or scripting, the reason being the necessity to loop through the entire arrays and perform comparisons. In PowerShell, though, this task is as simple as passing two arguments to a cmdlet. In Linux, we have the diff tool to help us compare the contents of two files.
Imagine that you had an input file with 30 server names. One of the administrators in the team picked up the list and performed modifications to it by adding and removing a few server names. This list was not source-controlled. Luckily, the administrator did not replace the file, but created a new copy. You would like to review the file before approving ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access