RSSAmplifier

Max Leiter · Mar 30, 2024

watch.sh

0
Sign in to vote or save

This page did not load. You can still read it on the original site — the toolbar below keeps your place in the directory.

A simple bash script for macOS that runs a command and displays a notification when the output of the command changes. #!/bin/bash if [ $# -eq 0 ]; then echo "Usage: $0 <command> [sleep_time]" exit 1 fi COMMAND="$1" SLEEP_TIME="${2:-3}" PREV_OUTPUT=$($COMMAND) while true; do CURRENT_OUTPUT=$($COMMAND) if [ "$CURRENT_OUTPUT" != "$PREV_OUTPUT" ]; then osascript -e 'display notification "Command…

Read on maxleiter.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.