[過去ログ] PowerShell -Part 6 (1002レス)
前次1-
抽出解除 必死チェッカー(本家) (べ) 自ID レス栞 あぼーん

このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
426: デフォルトの名無しさん [sage] 2022/07/08(金) 13:33:50.89 ID:EP1tRVB4(1/2) AAS
Windowsでコマンドラインシェルとして使う場合に
外部コマンド引数のクオーテーションの振る舞いをなんとかして欲しい

例えばpwshを外部コマンドとして使うとして

pwsh -nop -c "`$a = 'abc'; `$a | out-host"

は期待通り abc が出力されるのに

pwsh -nop -c '$a = "abc"; $a | out-host'

はエラーになるの不便過ぎる
429
(1): デフォルトの名無しさん [sage] 2022/07/08(金) 22:10:30.33 ID:EP1tRVB4(2/2) AAS
PS> pwsh -nop -c "`$a = 'abc'; `$a | out-host"
abc
PS> pwsh -nop -c '$a = "abc"; $a | out-host'
abc: The term 'abc' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

これほんと何がどうしてこうなるの?
前次1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル

ぬこの手 ぬこTOP 0.254s*