Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
仮定は、これはスクリプトです
#!/usr/bin/expect set a "__test__"
このスクリプト内にループを作成して、値を出力できるようにしたいと思います
$a
ループに基づいて、その前に番号を付けます。
したがって、3回ループさせたい場合..最終製品は次のようになります。
1:__test__ 2:__test__ 3:__test__
あなたが使用することができます
#!/usr/bin/expect set a "__test__" for {set x 0} {$x<3} {incr x} { puts "$x:$a" }
は言語の拡張であるため、 tcl コマンドで詳細を参照してください。expecttcl
expect
tcl