0648デフォルトの名無しさん
2018/04/01(日) 03:38:49.54ID:IR/E13YLpsv2.0に配列のcountあったっけか
$file = "test.txt"
$text = "てすと"
,@(Get-Content $file)|%{
foreach($i in 0..($_.count-1)){
if($i -eq ($_.count-1)){
if($_[$i] -like "*$text"){
$text
}else{
$_[$i];$text
}
}else{
$_[$i]
}
}
}|Out-File $file