07-13-2011
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
'read' command is not working inside the while loop, How can I solve this?
Rgds,
Sharif. (2 Replies)
Discussion started by: sharif
2 Replies
2. Shell Programming and Scripting
Hi All,
I wish to automate the unix command 'su' through a shell script.
I would like to pass the content of a file as password to 'su' command.
My script is as below,
#! /bin/sh
su userA
while read line
do
rpm -ivh $line
done < pwd.txt
where pwd.txt contains the password of... (6 Replies)
Discussion started by: little_wonder
6 Replies
3. Shell Programming and Scripting
I need to write a bourne shell script (solaris 10) that accepts input from the user. The input will be a command- any command like ls/ pwd/ mv etc. After the input is read, the shell must execute the command supplied by the user.
I know we use read to play with user inputs. Just not sure how to... (2 Replies)
Discussion started by: PDManc
2 Replies
4. Shell Programming and Scripting
Hi everyone, i have made a very simple script where it reads the user input and converts the number from celcius to faranheit but instead of running the command and prompting the user for input I want to be able to simply enter a number at the end of the command to run the script.
ex. instead of... (1 Reply)
Discussion started by: subway69
1 Replies
5. Shell Programming and Scripting
Hi All,
Do we know how to read input file within awk script and send output toanother log file. All this needs to be in awk script, not in command line. I am running this awk through crontab.
Cat my.awk
#!/bin/awk -f
function test(var){
some code}
{
}
END
{
print"test code"
} (5 Replies)
Discussion started by: random_thoughts
5 Replies
6. Shell Programming and Scripting
Hi,
I want to write a small code in which script changes command line input to some form.
Example
script.sh a1 a2 a3 a4 .....
output should be "a1|a2|a3|....."
Number of inputs in command line can be any variable (2 Replies)
Discussion started by: Raza Ali
2 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I want to use the read command in order to input a keyword from the keyboard.
I then want to use this keyword in a grep command.
How to I input a phrase as a keyword? For example if I use
read keyword
"today is"
and then use grep, I get "No such file or directory" error. (6 Replies)
Discussion started by: FelipeAd
6 Replies
8. Shell Programming and Scripting
Team ,
I am trying to write a case condition for database backups.But I am unable to make the script to read input from command line .
while true ;do
read -p "Do You Wish To Take Database Backup ?? " yn
case $yn in
*) echo " YES take backup ";;
*) echo " NO BACKUP " ;;
... (9 Replies)
Discussion started by: rocking77
9 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
I have a input file as below. Input file may contain more hostlists.
sample Input file
$ cat hostlist.lst
cs18-db1-1-sjl
cs22-db1-1-was
na88-db1-1-chi
na21-db1-2-was
I want the output like below format. Pls help. Thanks !
Output format:
... (4 Replies)
Discussion started by: kamauv234
4 Replies
10. Shell Programming and Scripting
Hi,
i am working on one automation , for that i have writing one shell program that take user input in "while read line" block. but read command is taking value that is readed by While block.
while read line; do
command 1;
command 2
echo -n "Do you want to continute > "
read rsp... (2 Replies)
Discussion started by: ranvijaidba
2 Replies
LEARN ABOUT DEBIAN
evs_mcast_joined
EVS_MCAST_JOINED(3) Corosync Cluster Engine Programmer's Manual EVS_MCAST_JOINED(3)
NAME
evs_join - Multicasts to all groups joined to an handle
SYNOPSIS
#include <sys/uio.h> #include <corosync/evs.h>
int evs_mcast_joined(evs_handle_t handle, evs_guraantee_t guarantee, struct iovec *iovec, int iov_len);
DESCRIPTION
The evs_mcast_joined function is multicast a message to all the groups that have been joined with the evs_join(3) function for the argument
handle. Messages that are sent to any of the groups joined to the parameter handle will be delivered to all processors in the system.
The argument guarantee requests a delivery guarantee for the message to be sent. The evs_guarantee_t type is defined by:
typedef enum {
EVS_TYPE_UNORDERED, /* not implemented */
EVS_TYPE_FIFO, /* same as agreed */
EVS_TYPE_AGREED, /* implemented */
EVS_TYPE_SAFE /* not implemented */
} evs_guarantee_t;
The meanings of the evs_guarantee_t typedef are:
EVS_GUARANTEE_UNORDERED
Messages are guaranteed to be delivered, but with no particular order. This mode is unimplemented in the EVS library.
EVS_GUARANTEE_FIFO
Messages are guaranteed to be delivered in first sent first delivery order from one one. In fact, this guarantee is actually the
AGREED guarantee.
EVS_GUARANTEE_AGREED
All processors must agree on the order of delivery. If a message is sent from two or more processors at about the same time, the
delivery will occur in the same order to all processors.
EVS_GUARANTEE_SAFE
All processors must agree on the order of delivery. Further all processors must have a copy of the message before any delivery
takes place. This mode is unimplemented in the EVS library.
The iovec argument describes the scatter/gather list which is used to transmit a message. This is a standard socket structure described
by:
struct iovec
{
void *iov_base; /* Pointer to data. */
unsigned int iov_len; /* Length of data. */
};
The iovlen argument describes the number of entires in the iovec argument.
RETURN VALUE
This call returns the EVS_OK value if successful, otherwise an error is returned.
ERRORS
The errors are undocumented.
SEE ALSO
evs_overview(8), evs_initialize(3), evs_finalize(3), evs_fd_get(3), evs_dispatch(3), evs_leave(3), evs_join(3), evs_mcast_groups(3),
evs_mmembership_get(3) evs_context_get(3) evs_context_set(3)
corosync Man Page 3004-08-31 EVS_MCAST_JOINED(3)