how to send/echo x (specific) number of messages in a shell script per sec -
How can I send a specific number, 1000, message (resonance) per second in a file through a shell script?
That is, I want to resonate in 1000 (like "hi") per second (tmp) file. Echo "Hi" >> TMP
Best you can do:
While:; While I [= i-lt 1000]; Do echo hi & gt; & Gt; Tmp i = $ ((i + 1)) Sleep done
In fact, the time to execute the commands in the interior, while the loop is not taken into account, so it is a little less The message will be written per second.
Comments
Post a Comment