Continously run command under bash

Posted . Visible to the public.

Sometimes you want to run a command forever, e.g. to compile a haml to html file on the console. Use this:

$ while(true) do haml index.haml index.html; sleep 1.5; done
Profile picture of Thomas Eisenbarth
Thomas Eisenbarth
Last edit
Keywords
linux, unix
License
Source code in this card is licensed under the MIT License.
Posted by Thomas Eisenbarth to makandra dev (2011-02-17 08:14)