「Windows/powershell」の版間の差分
提供: 初心者エンジニアの簡易メモ
(→powershellインストール) |
|||
| 行3: | 行3: | ||
macであれば、powershell-x.x.x-osx-x64.pkg をDL | macであれば、powershell-x.x.x-osx-x64.pkg をDL | ||
| + | |||
| + | ==テキスト文置換== | ||
| + | $data = Get-Content hoge.txt | % { $_ -replace "aaa", "ccc" } | ||
| + | $data | Out-File hoge.txt | ||
| + | |||
| + | 参考:https://teratail.com/questions/290149 | ||
2021年8月10日 (火) 22:03時点における版
powershellインストール
macであれば、powershell-x.x.x-osx-x64.pkg をDL
テキスト文置換
$data = Get-Content hoge.txt | % { $_ -replace "aaa", "ccc" }
$data | Out-File hoge.txt
