LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 01-13-2011, 05:24 AM   #16
GazL
Senior Member
 
Registered: May 2008
Posts: 3,312

Rep: Reputation: Disabled

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."
More portably, you can use a here-document, which also has the advantage of allowing you to do a few other fancy things like pre-formatting, or include variables
and command substitutions
Code:
wall <<_EOF
Some text here
     and here's some indented
     and today's date is $(date)
and so on.
_EOF
or, as has already been mentioned you can just take the input from the output of another command in the more usual pipe syntax, as per the now corrected example msmi10 posted.
 
Old 01-13-2011, 05:40 AM   #17
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 65
Quote:
Originally Posted by GazL View Post
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.
Here, it works even without the -n option. On Gentoo, that command is part of sysvinit-2.88-r1. So, there is no telling what sort of differences there is between Gentoo and Slackware.

 
1 members found this post helpful.
Old 01-13-2011, 05:59 AM   #18
GazL
Senior Member
 
Registered: May 2008
Posts: 3,312

Rep: Reputation: Disabled
Quote:
Originally Posted by dalek View Post
Here, it works even without the -n option. On Gentoo, that command is part of sysvinit-2.88-r1. So, there is no telling what sort of differences there is between Gentoo and Slackware.

There are one or two commands that seem to be differ between distros: 'rename' is another one that I find differs.
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.

Last edited by GazL; 01-13-2011 at 06:00 AM.
 
Old 01-13-2011, 06:02 AM   #19
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 65
Quote:
Originally Posted by GazL View Post
There are one or two commands that seem to be differ between distros: 'rename' is another one that I find differs.
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.
Yea but it did remind me to update my sig with the new and improved rig.

 
Old 01-13-2011, 08:23 AM   #20
unclejed613
Member
 
Registered: Mar 2009
Posts: 322

Rep: Reputation: 26
this works for me in slack 13 (i think i asked this question in another thread...)

Code:
wall {enter}
type whatever message you want here
it can even be several lines
because wall will send all it when you hit 
{control} d
 
Old 01-13-2011, 08:37 AM   #21
GazL
Senior Member
 
Registered: May 2008
Posts: 3,312

Rep: Reputation: Disabled
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.
 
Old 01-13-2011, 05:39 PM   #22
unclejed613
Member
 
Registered: Mar 2009
Posts: 322

Rep: Reputation: 26
ah-ha.... i did a "man wall" and the manpage says:
Code:
WALL(1)                   BSD General Commands Manual                  WALL(1)

NAME
     wall -- write a message to users

SYNOPSIS
     wall [file]

DESCRIPTION
     Wall displays the contents of file or, by default, its standard input, on
     the terminals of all currently logged in users.

     Only the super-user can write on the terminals of users who have chosen
     to deny messages or are using a program which automatically denies mes-
     sages.

     Reading from a file is refused when the invoker is not superuser and the
     program is suid or sgid.

SEE ALSO
     mesg(1), talk(1), write(1), shutdown(8)

HISTORY
     A wall command appeared in Version 7 AT&T UNIX.

AVAILABILITY
     The wall command is part of the util-linux-ng package and is available
     from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.

Linux 0.99                       March 8, 1993                      Linux 0.99
~
so yes, Slack uses the BSD wall, but the manpage really doesn't go into the details of the stdin input usage.

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

Last edited by unclejed613; 01-13-2011 at 05:44 PM.
 
Old 01-13-2011, 05:49 PM   #23
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 65
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.

 
Old 01-13-2011, 07:38 PM   #24
Nille_kungen
Member
 
Registered: Jul 2005
Posts: 201

Rep: Reputation: 43
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
or
Code:
wall <<< 'Please log off now!!!'
Or to play some more.
Code:
wall <<< 'Who want'\''s lunch?'
Code:
wall <<< "Who want"\'"s lunch?"
But i almost feel ashamed answering in this old thread.

Last edited by Nille_kungen; 01-13-2011 at 07:47 PM.
 
1 members found this post helpful.
Old 07-09-2012, 01:18 AM   #25
Lunar
Member
 
Registered: Feb 2005
Location: Texas, USA
Distribution: openSuSE
Posts: 75

Rep: Reputation: 3
Quote:
Originally Posted by Nille_kungen View Post
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
But i almost feel ashamed answering in this old thread.
Thank You.. Finally code that actually works!

Landis.
 
Old 02-11-2014, 02:44 AM   #26
Flashwalker
LQ Newbie
 
Registered: Jan 2010
Posts: 2

Rep: Reputation: 0
Exclamation

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.

Last edited by Flashwalker; 02-11-2014 at 02:57 AM.
 
Old 02-11-2014, 02:52 AM   #27
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,380

Rep: Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840
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).

Last edited by ponce; 02-11-2014 at 03:57 AM.
 
Old 02-11-2014, 04:11 AM   #28
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 6,861
Blog Entries: 51

Rep: Reputation: Disabled
Drive a stake through this thread's heart.
 
Old 02-12-2014, 11:28 PM   #29
Flashwalker
LQ Newbie
 
Registered: Jan 2010
Posts: 2

Rep: Reputation: 0
Wink

Quote:
Originally Posted by ponce View Post
have seen this -the awkward reviving-
6837.png
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending message to a user's console GUIPenguin Linux - General 1 10-27-2005 11:38 AM
broadcast message to all santosh_rao99 Linux - Networking 2 07-28-2004 11:41 PM
sending broadcast message in c raven Programming 1 12-06-2003 01:55 PM
broadcast message to all users JustinHoMi Linux - Software 1 11-14-2003 08:34 AM
How do I broadcast a message? miknight Linux - General 3 04-26-2003 01:24 AM


All times are GMT -5. The time now is 03:19 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration