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.
検討:
sprintf("%02d:%1d0", $tm[2], int($tm[1]/10)) if $rollup eq "600s";
10分ごとにデータを印刷します。
30分ごとにデータを印刷したいのですが、正しい方法は何ですか? 私は試した:
sprintf("%02d:%1d0", $tm[2], int($tm[3]/10)) if $rollup eq "600s";
この問題を解決するにはどうすればよいですか?
sprintf が行うのは、パラメーターのフォーマットだけです。実行頻度は、if$rollup eq "600s"部分によって制御されます。$rollup がどのように設定/更新されるかによって異なりますが、秒数が増えるだけであると仮定すると、次のようなものif $rollup eq "1800s"が機能する可能性があります
$rollup eq "600s"
if $rollup eq "1800s"