How to broadcast a message to all user's.
Hello!
I would like to broadcast a messsage to all user's on any terminal's. I've looked into 'talk' and 'write', I was looking for something similar the way shutdown work's: 'shutdown -r now "The system is going for a reboot"' Any advise on a way to accomplish this goal of mine? Thank you, Tarts. |
#> echo put your message here >> file.txt
#> wall file.txt I dont know if theres any other options.. man wall. |
Quote:
Allow me to show you the result's: Code:
#!/bin/bash Thank's! |
I thought you can straight away wall on the command line...
ie: wall Hey you people!!! |
Mine did
It worked on mine in Mandrake 9.1.
[root@smoker dale]# wall "hey you people" [root@smoker dale]# Broadcast message from root (pts/1) (Fri Oct 3 02:43:04 2003): hey you people [root@smoker dale]# he he he he he he. I learned something new. :D Thanks. :D :D :D :D :D |
My experiences:
micxz@mars:~> wall message.txt wall: will not read message.txt - use stdin. micxz@mars:~> cat message.txt | wall Broadcast Message from micxz@mars (/dev/pts/4) at 1:21 ... Hello' This is a cool thing you can do; Works nice; also: micxz@mars:~> wall testing typing now cntrl-D twice fast; Broadcast Message from micxz@mars (/dev/pts/4) at 1:21 ... testing typing now cntrl-D twice fast; Works also; |
freeBSD wont let me wants a
<group> <filename> |
Quote:
{edit} #wall Hello! then type ctrl d {edit2} #echo "Hello users, the date is `date`" | wall |
On my Ubuntu 10.04 I use something like:
echo Please log off now!!! | wall |
Quote:
:) :) |
1) Why are you resurrecting a 7 year old thread?
2) You didn't even get the command right! You'd end up getting a "Please log off now" command not found, doing that! Not exactly an auspicious first post. |
I had forgotten I even had a membership here
dang zombie thread |
First, stop the apostrophe abuse...
|
Quote:
|
Quote:
Code:
wall -n "please log off now" :D :D |
The wall command in Slackware (at least in Slackware Current) is from util-linux-ng 2.18 and doesn't appear to support the -n option. Perhaps the gentoo one is from a different origin or version.
There's plenty of ways of doing this though, msmi10 has since modified his code example above to something that should work (though it'd be better with quotes) so I'm not sure why there was a need to resurrect this thread once again. Resurrecting long dead threads wastes everyone's time and is annoying when you don't spot it is a zombie. Reading back I was clearly overly harsh with him, I guess I wasn't in a very tolerant mood that day (Everyone has bad days). In the hopes of finally laying this one to rest, I'll just finish with another couple of possibilities. In recent bash versions, you can use the syntax Code:
wall <<< "Never argue with an idiot. They drag you down to their level and then beat you with experience." and command substitutions Code:
wall <<_EOF |
Quote:
:D :D |
Quote:
Having said that, basic 'wall' usage is that simple I'm surprised anyone could manage to have a problem using it. Anyway, old thread and really not worth labouring over. Thanks for posting dalek. |
Quote:
:D :D |
this works for me in slack 13 (i think i asked this question in another thread...)
Code:
wall {enter} |
On reflection, I think all the confusion over this is a BSD v SYSV issue.
Slackware appears to use the bsd syntax wall [file] Other distros (Gentoo being one from what dalek said above) use a SYSV syntax wall [message text] However, both versions will accept input on stdin. |
ah-ha.... i did a "man wall" and the manpage says:
Code:
WALL(1) BSD General Commands Manual WALL(1) gee... from looking at the manpage for talk, it looks like talk could be used as a basic IM on a local network... i'll have to play with it a bit |
Mine says it was written by Miquel van Smoorenburg and at the top says "Linux User's Manual". It appears that Gentoo uses something entirely different. Sort of wonder why they didn't name it something different too. Maybe gwall or something if it is only used on Gentoo.
:D :D |
Reading this thread i saw that the command first posted used ! so using " " won't work.
So use ' ' instead. Code:
echo 'Please log off now!!!' | wall Code:
wall <<< 'Please log off now!!!' Code:
wall <<< 'Who want'\''s lunch?' Code:
wall <<< "Who want"\'"s lunch?" |
Quote:
Landis. |
wall absolutly doesn't broadcast anything on Ubuntu 12.04, when using by root or by user.
Works only via ssh and doesn't support cyrillic. |
maybe that's why this topic is in the Slackware forum, not the Ubuntu one.
if you have questions/reports about the usage of wall on Ubuntu, open a topic on the dedicated forum, don't revive an old thread on random ones (if you had read all this one you could have seen this -the awkward reviving- already happened in this same thread). |
Drive a stake through this thread's heart.
|
1 Attachment(s)
Quote:
|
I'm glad this thread still exists.
I joined just to say I use your site all the time and finding threads even as old as 2003 and having users still replying to them in 2015 and beyond shouldn't upset people because they're 'old'. This information is still useful, even today. Isn't that the point of a forum like this? :p
ANYWAY, I found the information on wall <<< "text here" useful, so thanks! :D |
Quote:
I hope you're doing well. Apologies for delay in replying. Did you try using the below command to find out the right syntax? Code:
man wall |
@deadthread123: so you are bored enough to answer someone whose last post dates back nearly 14 years ago???
|
Quote:
|
He got the right answer answer in post #2 and confirmed that it worked on post #3, more that 14 years ago.
Next time, please read previous answers before posting yours. Welcome to this forum anyway. |
All times are GMT -5. The time now is 01:24 AM. |