powershellのTIPS(ファイル結合とか、ファイル操作)
PowerShellのファイル結合、(統合、cat、COPYに近いコマンド)
code:powershell
#SJISで読み込んでUTF8で吐き出す、がこれ出来そう?
#Win10だとSJIS
Get-Content *.csv | Set-Content new.txt
#UTF8で吐き出す
Get-Content *.csv -Encoding UTF8 | Set-Content new2.txt -Encoding UTF8
ファイル操作
code:powershell
#CSVファイルをユニークにする。1万件でもはやい! 重複を削除
$ Get-Content data.csv | sort -Unique | Set-Content sjisuniq.txt
powershellでファイル分割する
APIのGETコマンドを使う
$ Invoke-WebRequest https://scrapbox.io/api/table/lololololol/三拍子/account.csv