how do I use wall command in a shell script to send repeated message every 30 secs

I need to create a shell script which should send repeated broadcast message to all users every 30 seconds for 5 mins. It should then close the popup window on the users system.
aspnetdevAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

omarfaridCommented:
What do you mean by "It should then close the popup window on the users system"?

Try

c=1
while test $c -lt 11
do
      wall "message......"
      sleep 30
      c=`expr $c + 1`
done
0
Pétur Ingi EgilssonSoftware Engineer -- ConsultantCommented:
omarfarid:

`wall "messag..."` does not work on my system as "wall" tries to read a file called "message..."
Instead i prefer `echo "Message" | wall`
0
omarfaridCommented:
You are right

My script modified to

c=1
while test $c -lt 11
do
      echo "message ...." | wall
      sleep 30
      c=`expr $c + 1`
done
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Pétur Ingi EgilssonSoftware Engineer -- ConsultantCommented:
note: Does not create popup windows in gnome cuz kwited is not in the GNOME configuration
http://www.experts-exchange.com/OS/Linux/Administration/Q_22470633.html

You could add "killall processName" to the end of that script if you know the name of the process which creates the "popups"
0
aspnetdevAuthor Commented:
I am using KDE,
0
Pétur Ingi EgilssonSoftware Engineer -- ConsultantCommented:
Did that command not work for you?
0
aspnetdevAuthor Commented:
it is giving syntax error
0
omarfaridCommented:
What is giving error?

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.