2 deleted 3 characters in body
source | link

I suspect that the line

    for torrent in '*.torrent'; do

is not expanding to a list of files because you've enclosed it in quotes. It expands later each time $torrent$torrent is used, but this passes all of your files to transmission at once.

Rewrite this line as

    for torrent in *.torrent; do

I also recommend using nullglob. See for loop glob mishaps.

Also, inotify-waitinotify-wait can be used to trigger a shell script when a file is created in a directory.

I suspect that the line

    for torrent in '*.torrent'; do

is not expanding to a list of files because you've enclosed it in quotes. It expands later each time $torrent is used, but this passes all of your files to transmission at once.

Rewrite this line as

    for torrent in *.torrent; do

I also recommend using nullglob. See for loop glob mishaps

Also, inotify-wait can be used to trigger a shell script when a file is created in a directory.

I suspect that the line

for torrent in '*.torrent'; do

is not expanding to a list of files because you've enclosed it in quotes. It expands later each time $torrent is used, but this passes all of your files to transmission at once.

Rewrite this line as

for torrent in *.torrent; do

I also recommend using nullglob. See for loop glob mishaps.

Also, inotify-wait can be used to trigger a shell script when a file is created in a directory.

1
source | link

I suspect that the line

    for torrent in '*.torrent'; do

is not expanding to a list of files because you've enclosed it in quotes. It expands later each time $torrent is used, but this passes all of your files to transmission at once.

Rewrite this line as

    for torrent in *.torrent; do

I also recommend using nullglob. See for loop glob mishaps

Also, inotify-wait can be used to trigger a shell script when a file is created in a directory.