Try out inotifyrun as a shell function rather than shell script