Skip to content
/ observe Public

Bash function for observing files and acting upon file modification.

License

Notifications You must be signed in to change notification settings

gnab/observe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

observe

Bash function for observing paths and acting upon file modification.

Utility for observing paths and/or executing a given command when any files are modified, i.e. run unit tests.

Installation

    git clone https://github.com/gnab/observe.git ~/.observe
    echo ". ~/.observe/observe.sh" >> ~/.bashrc

Usage

    observe [OPTION]... [PATH]...

    Observe specified paths, or current directory.

      -e <command>    Execute command when any files are modified
      -b              Execute the command in background (needs -e)
      -f              Execute the command on each changed file (needs -e)
      -i <filter>     Ignore files matching filter
      -h              Show this help and exit

Examples

    # run "rake" when non-"*.swp" files in current directory are modified
    observe -e rake -i "*.swp"
    # show the current number of lines in a text file, when it's changed
    observe -e "wc -l " -f "*.txt"

License

observe is licensed under the MIT license. See LICENCE for further details.

About

Bash function for observing files and acting upon file modification.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages