The only failing here is that PowerShell doesn't have the developed string-manipulation tools like sed, awk, etc. because working with text is typically unnecessary.)
What kind of tools does it not have? It has all the .Net style string methods (split, trim, and so on), all the .Net regex methods, built in arrays and hashtables, looping over lines of text shortcuts.
It's pretty trivial to do small scale ad-hoc text parsing, cut lines by a character, take element 4, cast to 'datetime' and add +4 days to it, handwave a counter into existance and +1 it, match a regex and do some replacement or group some fields.
It doesn't go as far as sed "in-place text replace" or awk records, but saying it "doesn't have developed string-manipulation like sed" is like saying that of Python. And if you were writing Python you wouldn't need to call out to awk because you'd just use Python string processing and basic data structures for what you were doing, right?
I meant exactly that "it doesn't go as far as sed... or awk...". PowerShell has what I would term the primitives of string manipulation, inherited from .NET -- substring, trim, regex replace, etc. But it does not have the advanced methodologies that sed and awk provide. Especially in regards to editing, since PowerShell also inherits .NET's immutable strings.
This. AWK is the best tool for record DSV record manipulation I've ever used. Some would say that it has since been surpassed by other scripting languages, but I disagree. It's fast to learn, and is incredibly good at what it does, with a very simple and elegant design. Simple AWK scripts can read like descriptions of what you want done. Like this script that prints all users in /etc/passwd that have home directories in /home:
What kind of tools does it not have? It has all the .Net style string methods (split, trim, and so on), all the .Net regex methods, built in arrays and hashtables, looping over lines of text shortcuts.
It's pretty trivial to do small scale ad-hoc text parsing, cut lines by a character, take element 4, cast to 'datetime' and add +4 days to it, handwave a counter into existance and +1 it, match a regex and do some replacement or group some fields.
It doesn't go as far as sed "in-place text replace" or awk records, but saying it "doesn't have developed string-manipulation like sed" is like saying that of Python. And if you were writing Python you wouldn't need to call out to awk because you'd just use Python string processing and basic data structures for what you were doing, right?