#!/bin/bash # Ruta del directorio a monitorear DIRECTORIO="/home/teraflops/Imágenes/Capturas de pantalla" # Monitorear el directorio y ejecutar el comando cuando se cree un archivo nuevo inotifywait -m -e create --format '%f' "$DIRECTORIO" | while read NOMBRE_FICHERO do # Ejecutar el comando pastebin_client.sh upload "$DIRECTORIO/$NOMBRE_FICHERO" | wl-copy -n done