こんなシェルを書きました。
function get_stop_code {
$hoge=(Get-Content stop_code.txt)
}
while ($true) {
get_stop_code
Write-Output $hoge
}
シェル実行中に、stop_code.txtの中身を書き換えても
get_stop_codeがファイルの中身を拾ってくれません
いろいろ試したら、こうしたらうまくいきました。がすっきりしません。
function get_stop_code {
$hoge=(Get-Content stop_code.txt)
Write-Output $hoge
}
while ($true) {
$stop_code=(get_stop_code)
write-output $stop_code
}
get_stop_codeがファイルの中身を、while ($true)の中でうまく拾ってくれる
書き方を教えてください。
PowerShell -Part 4
■ このスレッドは過去ログ倉庫に格納されています
703デフォルトの名無しさん
2020/11/07(土) 21:29:59.64ID:AAgSLehy■ このスレッドは過去ログ倉庫に格納されています
