That seems to do exactly what I wan't, it's just not writing it to the file (my file named phonebook).
I changed the on call day from Wed to Sun and it came up and showed
Henry Test 000-000-0000 Sun
But it didn't write it to the file. Im not familiar with awk, but could I make the awk line a variable to use to add to the file?
like:
add = awk -v N=$name ..... etc
echo "$add" >> phonebook
or would that not work?
Last edited by hxdrummerxc; 12-12-2012 at 10:52 PM..
I have a property file in which the DB name is specified and when i run my servers they will point to the DB specified in that property file. Now i'm gonna write a script which will start all the services. But before that i just want to dynamically change the DB name in that property file by... (3 Replies)
1.
how can i replace ' / ' with new line in shell script or sed ?
2.
how can set a conditon untill null in while loop
while ( i== null )
do
......
done (3 Replies)
hi!
i have a file consisting of the following lines:
(BTW, = space)
.
.
.
12ME_T1mapping_flip30bshortf
13DCE_whole_brainbshortf
13DCE_3Dbshortf
.
.
.
the list of scans starts at 1 and goes on sometimes up to 60 scans. i would like to change only the lines that contain 'whole' to... (2 Replies)
I am searching while I await a response to this so if it has been asked already I apologize.
I have a file with lines in it that look like:
bob johnson email@email.org
I need it to look like:
bob:johnson:email@email.org
I am trying to use sed like this:
sed -e 's/ /:/g' file >... (5 Replies)
Hi all
im having trouble starting with a shell script, i hope someone here can help me
i have 2 files
file1:
404905.jpg 516167
404906.jpg 516168
404917.psd 516183
404947.pdf 516250
file2:
516250 /tmp/RecyclePoster18241.pdf
516167 /tmp/ReunionCardFINAL.jpg
516168... (7 Replies)
Dear all
I need a script for multiple find and replace in a single file.
For example input file is -
qwe wer ert rty tyu
asd sdf dgf dfg fgh
qwe wer det rtyyui
jhkj ert asd asd dfgd
now
qwe should be replace with aaaaaa
asd should be replace with bbbbbbbb
rty should be replace... (6 Replies)
Gurus,
You know, I believe you do:-), the comnand uname -r give you the kernel version:
serverA:~# uname -r
2.6.26-1-xen-amd64So, I want to replace this output inside in the line below that is inside the file:
kernel = '/boot/vmlinuz-2.6.26-1-xen-amd64'Suppose, you move this file to ther... (2 Replies)
Hi,
I am creating a script to do a find and replace single/multiple lines in a file with any number of lines.
I have written a logic in a script that reads a reference file say "findrep" and populates two variables $FIND and $REPLACE
print $FIND gives
Hi How r $u
Rahul()
Note:... (0 Replies)
Can someone tell me how I can do this?
e.g:
Say file1.txt contains:
today is monday
the 22 of
NOVEMBER
2010
and file2.txt contains:
the
11th
month
of
How do i replace the word NOVEMBER with (5 Replies)
Hi,
Can anyone help me for merge the following multi-line log which beginning with a " and line ending with ": into one line.
*****Original Log*****
087;2008-12-06;084403;"mc;;SYHLR6AP1D\LNZW;AD-703;1;12475;SYHLR6AP1B;1.1.1.1;0000000062;HGPDI:MSISDN=12345678,APNID=1,EQOSID=365;... (3 Replies)
Discussion started by: rajeshlinux2010
3 Replies
LEARN ABOUT DEBIAN
ocf_heartbeat_sfex
OCF_HEARTBEAT_SFEX(7) OCF resource agents OCF_HEARTBEAT_SFEX(7)NAME
ocf_heartbeat_sfex - Manages exclusive access to shared storage using Shared Disk File EXclusiveness (SF-EX)
SYNOPSIS
sfex [start | stop | monitor | meta-data | validate-all]
DESCRIPTION
Resource script for SF-EX. It manages a shared storage medium exclusively .
SUPPORTED PARAMETERS
device
Block device path that stores exclusive control data. (required, string, no default)
index
Location in block device where exclusive control data is stored. 1 or more is specified. Default is 1. (optional, integer, default 1)
collision_timeout
Waiting time when a collision of lock acquisition is detected. Default is 1 second. (optional, integer, default 1)
monitor_interval
Monitor interval(sec). Default is 10 seconds (optional, integer, default 10)
lock_timeout
Valid term of lock(sec). Default is 100 seconds. The lock_timeout is calculated by the following formula. .sp lock_timeout =
monitor_interval + "The expiration time of the lock" .sp We suggest 90 seconds as a default value of the "The expiration time of the
lock", but you should change it in consideration of access delay to the shared disk and the switch time of the multipath driver. .sp
The lock timeout have an impact on start action timeout because start action timeout value is calculated by the following formula. .sp
start timeout = collision_timeout + lock_timeout + "safety margin" .sp The "safety margin" is decided within the range of about 10-20
seconds(It depends on your system requirement). (optional, integer, default 100)
SUPPORTED ACTIONS
This resource agent supports the following actions (operations):
start
Starts the resource. Suggested minimum timeout: 120s.
stop
Stops the resource. Suggested minimum timeout: 20s.
monitor
Performs a detailed status check. Suggested minimum timeout: 10s. Suggested interval: 10s.
meta-data
Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5s.
validate-all
Performs a validation of the resource configuration. Suggested minimum timeout: 5s.
EXAMPLE
The following is an example configuration for a sfex resource using the crm(8) shell:
primitive p_sfex ocf:heartbeat:sfex
params
device=string
op monitor depth="0" timeout="10s" interval="10s"
SEE ALSO
http://www.linux-ha.org/wiki/sfex_(resource_agent)
AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors)
resource-agents UNKNOWN 03/09/2014 OCF_HEARTBEAT_SFEX(7)