You are not logged in.

#1 2014-03-19 23:46:15

apolyonn
Member
Registered: 2013-05-21
Posts: 46

[SOLVED] Broken script sends me the same message every ten seconds

I accidentally did something really, really stupid earlier.

After modifying a script, I kept a "while/do" loop intact in such a manner similar to this:

while [ i==0 ]; do
     echo "message" | mail myemail@host.com
done

As you can see, this sent the same message god-knows-how-many-times in the minute or two it took me to figure out the issue.  So, my mailbox is being flooded with this same message.  Removing heirloom-mailx didn't yield any positive results.

Is there any way I can prevent it from sending any more copies produced by this loop, or do I just have to put up with it until it produces its very last message from that?  In the two minutes it took to type this message, I've already received eight more copies, and more are on the way.

Last edited by apolyonn (2014-03-20 01:37:08)

Offline

#2 2014-03-19 23:54:50

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Broken script sends me the same message every ten seconds

Have you tried killing the script? How about rebooting the computer?

Offline

#3 2014-03-20 00:06:36

apolyonn
Member
Registered: 2013-05-21
Posts: 46

Re: [SOLVED] Broken script sends me the same message every ten seconds

karol wrote:

Have you tried killing the script? How about rebooting the computer?

Both, to no avail.

Offline

#4 2014-03-20 00:09:28

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Broken script sends me the same message every ten seconds

What is starting that script? Where did you put these lines?

Offline

#5 2014-03-20 00:12:57

apolyonn
Member
Registered: 2013-05-21
Posts: 46

Re: [SOLVED] Broken script sends me the same message every ten seconds

karol wrote:

What is starting that script? Where did you put these lines?

I don't believe anything is starting the script.  I assume that they've already been sent to the server, and Gmail is just throwing them my way, in small-ish chunks.  I was just wondering/hoping if, possibly, there was some sort of workaround.

Last edited by apolyonn (2014-03-20 00:14:14)

Offline

#6 2014-03-20 00:22:05

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Broken script sends me the same message every ten seconds

I recall a somewhat similar situation when one guy texted another guy during a lecture.
He did send the message, but the other guy's phone didn't seem to get it. It was silent. So he send it again. And again. To make it even "better", it was a two-part message ...

For a while nothing happened and then the other guy's phone starter receiving all these messages. He had a loud, high-pitched ringtone on his phone. And he had his phone ... somewhere. Was it in his backpack? Was it in his bag? In his jacket?
Chaos ensued.


So you can see it could have been worse :-)

Offline

#7 2014-03-20 00:32:39

apolyonn
Member
Registered: 2013-05-21
Posts: 46

Re: [SOLVED] Broken script sends me the same message every ten seconds

karol wrote:

I recall a somewhat similar situation when one guy texted another guy during a lecture.
He did send the message, but the other guy's phone didn't seem to get it. It was silent. So he send it again. And again. To make it even "better", it was a two-part message ...

For a while nothing happened and then the other guy's phone starter receiving all these messages. He had a loud, high-pitched ringtone on his phone. And he had his phone ... somewhere. Was it in his backpack? Was it in his bag? In his jacket?
Chaos ensued.


So you can see it could have been worse :-)

Haha, fair enough smile  I was reminded of the "Look Around You" opening sequence.

10 PRINT LOOK AROUND YOU
20 GOTO 10
30 RUN

Set-up a gmail filter to delete them as they come in; that should hold me over for the time being.
Solved.

Last edited by apolyonn (2014-03-20 00:38:06)

Offline

#8 2014-03-20 01:02:33

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] Broken script sends me the same message every ten seconds

apolyonn wrote:

Set-up a gmail filter to delete them as they come in; that should hold me over for the time being.

Seriously?

karol wrote:

What is starting that script? Where did you put these lines?

You don't know where the script is running, or where you put that code? You tried rebooting, and that didn't work? Your best solution is something equivalent to putting your fingers in your ears and pretending nothing is wrong? Sorry if this sounds harsh, but this problem should not be that hard to fix.

Offline

#9 2014-03-20 01:06:45

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Broken script sends me the same message every ten seconds

apolyonn, is the script still running?

2ManyDogs, it's possible to send many e-mails and to receive them even an hour later. It happened to me not to long ago.

Offline

#10 2014-03-20 01:29:56

apolyonn
Member
Registered: 2013-05-21
Posts: 46

Re: [SOLVED] Broken script sends me the same message every ten seconds

2ManyDogs wrote:

[...]

Not really sure who you're addressing here, but yeah, my best solution is to keep the surges of emails out of my Inbox.

karol wrote:

apolyonn, is the script still running?

I killed the script awhile ago.

Offline

#11 2014-03-20 01:33:34

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Broken script sends me the same message every ten seconds

I think you can mark the thread as solved then https://bbs.archlinux.org/viewtopic.php?id=130309

Offline

#12 2014-03-20 01:36:44

apolyonn
Member
Registered: 2013-05-21
Posts: 46

Re: [SOLVED] Broken script sends me the same message every ten seconds

oh, thanks.

Offline

Board footer

Powered by FluxBB