Skip to main content
edited tags; edited title
Link
Gilles 'SO- stop being evil'
  • 865.4k
  • 205
  • 1.8k
  • 2.3k

Bash script executes over 100 ×to detect uploaded files triggers many times for one file

deleted 1 character in body
Source Link
ctrl-alt-delor
  • 28.8k
  • 11
  • 66
  • 113

Bash script executes over 100 x×

I have a simple bash script setup that uses the built-in inotify daemon running CentOS 6.6. The script will simply echo the file that is upload to a specific directory. The script works but it echo'sechos out the same filename over 100 times. I can't seem to figure out why it would do that.

#!/bin/bash

/usr/bin/inotifywait -e create,delete,modify,move -mrq --format %f /home/imgthe/public_html/run/thumbs --excludei sess_* |  
while read INPUT;
INPUT
do
 
    FILENAME=$INPUT

    DATE='date'

    echo $FILENAME
    printf $INPUT >> sku.txt
done

Bash script executes over 100 x

I have a simple bash script setup that uses the built-in inotify daemon running CentOS 6.6. The script will simply echo the file that is upload to a specific directory. The script works but it echo's out the same filename over 100 times. I can't seem to figure out why it would do that.

#!/bin/bash

/usr/bin/inotifywait -e create,delete,modify,move -mrq --format %f /home/imgthe/public_html/run/thumbs --excludei sess_* | while read INPUT;

do
 
FILENAME=$INPUT

DATE='date'

echo $FILENAME
printf $INPUT >> sku.txt
done

Bash script executes over 100 ×

I have a simple bash script setup that uses the built-in inotify daemon running CentOS 6.6. The script will simply echo the file that is upload to a specific directory. The script works but it echos out the same filename over 100 times. I can't seem to figure out why it would do that.

#!/bin/bash

/usr/bin/inotifywait -e create,delete,modify,move -mrq --format %f /home/imgthe/public_html/run/thumbs --excludei sess_* |  
while read INPUT
do
    FILENAME=$INPUT

    DATE='date'

    echo $FILENAME
    printf $INPUT >> sku.txt
done
deleted 6 characters in body
Source Link
Anthon
  • 81.4k
  • 42
  • 174
  • 228

I have a simple bash script setup that uses the built-in inotify deamondaemon running CentosCentOS 6.6. The script will simply echo the file that is upload to a specific directory. The script works but it echo's out the same filename over 100 times. I can't seem to figure out why it would do that. Thanks

#!/bin/bash

/usr/bin/inotifywait -e create,delete,modify,move -mrq --format %f /home/imgthe/public_html/run/thumbs --excludei sess_* | while read INPUT;

do

FILENAME=$INPUT

DATE='date'

echo $FILENAME
printf $INPUT >> sku.txt
done

I have a simple bash script setup that uses the built-in inotify deamon running Centos 6.6. The script will simply echo the file that is upload to a specific directory. The script works but it echo's out the same filename over 100 times. I can't seem to figure out why it would do that. Thanks

#!/bin/bash

/usr/bin/inotifywait -e create,delete,modify,move -mrq --format %f /home/imgthe/public_html/run/thumbs --excludei sess_* | while read INPUT;

do

FILENAME=$INPUT

DATE='date'

echo $FILENAME
printf $INPUT >> sku.txt
done

I have a simple bash script setup that uses the built-in inotify daemon running CentOS 6.6. The script will simply echo the file that is upload to a specific directory. The script works but it echo's out the same filename over 100 times. I can't seem to figure out why it would do that.

#!/bin/bash

/usr/bin/inotifywait -e create,delete,modify,move -mrq --format %f /home/imgthe/public_html/run/thumbs --excludei sess_* | while read INPUT;

do

FILENAME=$INPUT

DATE='date'

echo $FILENAME
printf $INPUT >> sku.txt
done
Source Link
Loading