前スレ
PowerShell -Part 3
https://mevius.5ch.net/test/read.cgi/tech/1539074808/
次スレは>>980が立ててね!!
PowerShell -Part 4
■ このスレッドは過去ログ倉庫に格納されています
2020/01/01(水) 16:08:31.66ID:4oQ1Kxot
833デフォルトの名無しさん
2020/12/17(木) 05:23:59.73ID:P27ySftq powershell -Command "%{((Invoke-WebRequest https://example.com/test.txt).Content) -join '`r`n'}|Out-File abc.txt -Encoding default -Append -NoNewline"
powershell -Command "%{((Invoke-WebRequest https://example.com/test.txt).Content) -replace '`n,`r`n'}|Out-File abc.txt -Encoding default -Append -NoNewline"
リファレンスとにらめっこし何百回と色々試してこれに行き着いてこれなら行けそうと思ったのですがLFのまま。。
Get-ContentとかSet-Contentとかも試してみたのですが基礎的な書き方も知らず当てずっぽうではダメなようです
基礎的な事から覚えないとちょっと自分には無理かもです^^;
powershell -Command "%{((Invoke-WebRequest https://example.com/test.txt).Content) -replace '`n,`r`n'}|Out-File abc.txt -Encoding default -Append -NoNewline"
リファレンスとにらめっこし何百回と色々試してこれに行き着いてこれなら行けそうと思ったのですがLFのまま。。
Get-ContentとかSet-Contentとかも試してみたのですが基礎的な書き方も知らず当てずっぽうではダメなようです
基礎的な事から覚えないとちょっと自分には無理かもです^^;
834デフォルトの名無しさん
2020/12/17(木) 11:05:46.69ID:IMvwa6Jv >>833
-replace '`n,`r`n' のところは -replace '`n','`r`n' じゃない?
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comparison_operators?view=powershell-5.1#replacement-operator
-replace '`n,`r`n' のところは -replace '`n','`r`n' じゃない?
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comparison_operators?view=powershell-5.1#replacement-operator
■ このスレッドは過去ログ倉庫に格納されています
