Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
while IFS='' read -r line || [[ -n "$line" ]]; do echo "$line";grep "$line" content.txt; done < filter_words_content.txt
@landys
landys / onchange.sh
Last active July 27, 2016 10:53 — forked from senko/onchange.sh
Watch current directory and execute a command/mutiple commands if anything in it changes
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <[email protected]>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of