Run command every second in Bash?

后端 未结 3 2048
闹比i
闹比i 2020-12-14 05:37

I want to write some image downloader and assign it on bash. What I have and what I need:

I have:

  1. Command, which works fine (something like wget
3条回答
  •  情书的邮戳
    2020-12-14 06:15

    The command watch will do this for you straight up. It also displays the result in a nice way.

    $ watch -n 1 date
    

    Substitute date for your command. The -n option specifies the interval in seconds.

提交回复
热议问题