Try this and save some overhead. While not really an impact in this situation, in a bigger program it will have a bigger impact and it is just a good habit to get into.
Hi -
Trying to take a list of ldap suffixes in a file, run an ldapsearch command on them, then run a grep command to see if it's a match, if not, then flag that and send an email alert.
The list file (ldaplist) would look like -
***********
o=company a
o=company b
***********
**... (7 Replies)
I was searching for an option where i can echo some strings together with the contents of a file.
Eg. I was to echo the below string to a file
"alter application PMS_ add variable CurrYear Y2009;" >> ${ESS_MAXL_DIR}/PMS_SUB.txt
The value 2009 is coming from a file called date.txt without the... (3 Replies)
Pls this is emergency.I have written a script which is taking input from another script. and the contents of my second script are acting as functions to my main script.Now the problem is that in one of the functions i want the script ececution to stop and start when user enters any character r... (2 Replies)
I have a script consisting of certain functions whose input is a file at same location. In that file i have written the name of anothe file at same location. The third file contains a word which act as a function in the first script.Let me give an example
i have a scrip file say 1.sh in which i am... (7 Replies)
Hi there
I want to ask to a user something about each line of a file. This is my code:
#cat test.txt
first line
second line
third line
#cat test.sh
#!/bin/ksh
read_write () {
echo "Do you want to print the line (YES/NO)?\n"
read TEST
case ${TEST} in
YES) return 0;;
... (3 Replies)
Hi Guys..
need some urgent help... I am stuck in something badly
I need to write a script which would read a sql statement (which might be a join/inner join/select/sub select etc. )
I need to read that sql statement ... and in the output I want all the table names and columns (doesn't... (4 Replies)
While working on awk programming, i found that it doesn't understand 'read' statement. Then what's the use of 'continue' and 'break' statement in awk.
For ex:
awk '{k=1; while (k<10) {print $0; k++}}' emp.lst
Now, please say if I want to put the logic that after priting 1 line, it will ask for... (13 Replies)
hello guys,
i am having the below piece of code
error
()
{
echo"Press y /n"
read ans
case $ans in
y) main;;
n) exit
esac
}
In the abve code, read statement is not working i.e not waiting for user to enter input.
,i tested exit status its 1.
could anyone help me to do this
... (11 Replies)
Hi,
I've been having trouble figuring out what the following read statement is doing.
DO I = 1, natom
k = 3 * (i - 1) + 1
READ(8,*) AtNum(I), (X_2(J),J=k,k+2)
END DO
The part I don't understand is:
(X_2(J),J=k,k+2)
the file it is reading is simply a set of... (8 Replies)
I'm looking for some help in figuring why my little bit of code will not process any entries other then the first one in my list.
while read line ;do
hostname=${line//\"}
a=`ssh user@$hostname uptime;echo $?`
if ];then
dt=`date`
touch... (6 Replies)
Discussion started by: whegra
6 Replies
LEARN ABOUT CENTOS
ping_pong
PING_PONG(1) CTDB - clustered TDB database PING_PONG(1)NAME
ping_pong - measures the ping-pong byte range lock latency
SYNOPSIS
ping_pong {-r | -w | -rw} [-m] [-c] {FILENAME} {NUM-LOCKS}
DESCRIPTION
ping_pong measures the byte range lock latency. It is especially useful on a cluster of nodes sharing a common lock manager as it will give
some indication of the lock manager's performance under stress.
FILENAME is a file on shared storage to use for byte range locking tests.
NUM-LOCKS is the number of byte range locks, so needs to be (strictly) greater than the number of nodes in the cluster.
OPTIONS -r
test read performance
-w
test write performance
-m
use mmap
-c
validate the locks
EXAMPLES
Testing lock coherence
ping_pong test.dat N
Testing lock coherence with lock validation
ping_pong -c test.dat N
Testing IO coherence
ping_pong -rw test.dat N
SEE ALSO ctdb(7), https://wiki.samba.org/index.php/Ping_pong
AUTHOR
This documentation was written by Mathieu Parent
COPYRIGHT
Copyright (C) 2002 Andrew Tridgell
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses.
ctdb 11/27/2013 PING_PONG(1)