07-06-2005
If you do the command you put in the script from the command line, don't you get an error stating 'Cannot open stop backup'?
Put your message into a file. Use either of the following in the script:
cat /yourdir/your-msg-file | wall
wall < /yourdir/your-msg-file
where /yourdir/your-msg-file is the file you use to contain the message you want to send. Add the -a option to send to all terminals.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Dear all,
How can I deny messaging which use "wall" command to send message out?
regards
Wilson (7 Replies)
Discussion started by: wilsonchan1000
7 Replies
2. UNIX for Dummies Questions & Answers
I have a problem with running jobs out of cron on Solaris 8.
Initially when one of the users on the box (other than root) attempted to save the crontab after modification by using "crontab -e", the message "Crontab: cannot open the crontab file in the crontab directory" was given.
I then... (7 Replies)
Discussion started by: mattd
7 Replies
3. Shell Programming and Scripting
Hello,
Ive written a little script that broadcasts a message if certain criteria are met. The script works fine when I run it.
I entered it in the crontab to run every hour on the hour. The script executes, but the wall command doesnt seem to be executing correctly. I only have this... (1 Reply)
Discussion started by: xadamz23
1 Replies
4. UNIX for Dummies Questions & Answers
I am trying to schedule a new job but I get
# cron
# ! cron is already running Mon Jul 11 08:28:51 WAT 2005
! ******* CRON ABORTED ******** Mon Jul 11 08:28:51 WAT 2005
I tried the -l and -e switches but I get the same message
I am using HP-UX
Thanks. (3 Replies)
Discussion started by: GNMIKE
3 Replies
5. UNIX for Dummies Questions & Answers
Hi;
I want to schedule a backup in the cron, I know that the backup will use 2 tapes.
How do I make to see the message of tape change and to respond him?
TIA
Regards (3 Replies)
Discussion started by: gareljos
3 Replies
6. Red Hat
Hi,
as per title, please help me.. I use command wall host1 host2 hellowwwww
but it only receive in the host1..
how can I send this to all the clients.. I want this 1 server to send to all the clients.. or is there any program that I can use? I know this openfire, but seems complicated since... (5 Replies)
Discussion started by: flekzout
5 Replies
7. AIX
Hello,
I keep getting this message even after i removed it from the cron enteries it was added automatically
Broadcast message from root@oradb (tty) at 12:00:00 ...
rc.powerfail:2::WARNING!!! The system is now operating with a power problem. This message will be walled every 12... (2 Replies)
Discussion started by: filosophizer
2 Replies
8. SuSE
So I've been tasked with creating a shell script to run in a cron every few minutes to check duplex settings on my eth0 nic card. I would like for the server to send a wall message to whoever is on the console or in a terminal session. Below is what I have so far.
0,10,20,30,40,50 * * * * ... (1 Reply)
Discussion started by: lutador72
1 Replies
9. Shell Programming and Scripting
So I've been tasked with creating a shell script to run in a cron every few minutes to check duplex settings on my eth0 nic card. I would like for the server to send a wall message to whoever is on the console or in a terminal session. Below is what I have so far.
0,10,20,30,40,50 * * * * ... (7 Replies)
Discussion started by: lutador72
7 Replies
10. UNIX for Dummies Questions & Answers
Hello gurus,
I am making what I think is a simple db2 call from within a shell script but I am having difficulty producing the desired
report when I run the script shown below from a shell script in cron. For example, my script and the crontab file setup
is shown below:
#!/bin/ksh
db2... (3 Replies)
Discussion started by: okonita
3 Replies
LEARN ABOUT ULTRIX
sendmsg
send(2) System Calls Manual send(2)
Name
send, sendto, sendmsg - send a message from a socket
Syntax
#include <sys/types.h>
#include <sys/socket.h>
cc = send(s, msg, len, flags)
int cc, s;
char *msg;
int len, flags;
cc = sendto(s, msg, len, flags, to, tolen)
int cc, s;
char *msg;
int len, flags;
struct sockaddr *to;
int tolen;
cc = sendmsg(s, msg, flags)
int cc, s;
struct msghdr msg[];
int flags;
Description
The and system calls are used to transmit a message to another socket. The system call may be used only when the socket is in a connected
state, while the and system calls may be used at any time.
The address of the target is given by to, with tolen specifying its size. The length of the message is given by len. If the message is
too long to pass atomically through the underlying protocol, the error EMSGSIZE is returned, and the message is not transmitted. If the
address specified in the argument is a broadcast address, the SO_BROADCAST option must be set for broadcasting to succeed.
No indication of failure to deliver is implicit in a Return values of -1 indicate some locally detected errors.
If no messages space is available at the socket to hold the message to be transmitted, normally blocks, unless the socket has been placed
in nonblocking I/O mode. The call can be used to determine when it is possible to send more data.
The flags parameter can be set to MSG_OOB to send out-of-band data on sockets that support this features (for example, SOCK_STREAM).
See for a description of the msghdr structure.
The call returns the number of characters sent, or -1 if an error occurred.
Diagnostics
[EBADF] An invalid descriptor was specified.
[EDESTADDRREQ] A required address was omitted from an operation on a socket.
[EFAULT] An invalid user space address was specified for a parameter.
[EINVAL] An invalid argument length for the message was specified.
[EINTR] The send was interrupted by delivery of a signal.
[ENOTCONN] The socket is not connected.
[ENOTSOCK] The argument s is not a socket.
[EMSGSIZE] The socket requires that messages be sent atomically, and the size of the message to be sent made this impossible.
[EPIPE] A write on a pipe or socket for which there is no process to read the data.
[EWOULDBLOCK] The socket is marked nonblocking, and the requested operation would block.
See Also
recv(2), getsockopt(2), socket(2)
send(2)