3 ms·
grep is Select-String diff is an alias for Compare-Object so if you tried it, you should have seen it do something. But unlike actual diff it operates on objec
by seabee 15y ago
grep is Select-String
diff is an alias for Compare-Object so if you tried it, you should have seen it do something. But unlike actual diff it operates on objects rather than files, so you need to gc (Get-Content) the files you want to compare.
sed/awk: string manipulation is built-in to PowerShell, but sed's in-place file editing is replicated by piping Get-Content into Set-Content. Sometimes more verbose, sometimes not.
I personally don't see what value PowerShell would bring to other platforms, given they already have huge swathes of scripts written in well-developed (or at least well-discussed) languages and command-line tools for system administration are plentiful. But why would you bother using Perl when you already have Ruby? Obviously some people will take the choice if they know it.