Is there any sed like utility for cmd.exe? [closed]

Today powershell saved me.

For grep there is:

get-content somefile.txt | where { $_ -match "expression"}

or

select-string somefile.txt -pattern "expression"

and for sed there is:

get-content somefile.txt | %{$_ -replace "expression","replace"}

For more detail about replace PowerShell function see this Microsoft article.

Leave a Comment