01-22-2009
My output is like this:
301,1,1,301jjones
302,1,1,302jjones
303,200,4,303jdeer
303mjohnson
303jjones
303kwoods
304,30,1,304jjones
305,1,1,305jjones
306,37,3,306jjones
306swalker
306bblanks
........ etc ......
I want output to be:
301,1,1,
301jjones
302,1,1,
302jjones
303,200,4,
303jdeer
303mjohnson
303jjones
303kwoods
304,30,1,
304jjones
305,1,1,
305jjones
306,37,3,
306jjones
306swalker
306bblanks
........ etc ......
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I hope this makes sense, but I need help with what is indicated with %%, below :
A.) ####List active servers and send to file####
# ps -ef | grep jboss | grep sh | awk '{if ($14) {print $12;}else {print $11}}' | sort > /export/home/kthatch/script_results
client302
client306
client309... (1 Reply)
Discussion started by: kthatch
1 Replies
2. Shell Programming and Scripting
Hi,
I want to write a sed script which from
batiato:
batiato/giubbe:
pip_b.2.txt
pip_b.3.txt
pip_b.3mmm.txt
bennato:
bennato/peterpan:
123.txt
consoli:
pip_a.12.txt
daniele: (2 Replies)
Discussion started by: one71
2 Replies
3. UNIX for Dummies Questions & Answers
I've shell script where i used the below command to take the line which contains patterns.
sed -n "/$year 05:/,/$year 17:/p" trace.log | grep -f patterns.txt > output.log
This was working fine for long time, but now a days this script is not working with and throwing error like
sed:... (8 Replies)
Discussion started by: senthil.ak
8 Replies
4. Shell Programming and Scripting
Hi Guys,
I have a file in which each set of records are separated by two blank line. I want to replace it with a single blank line.
Can you guys help me out?
Regards,
Magesh (9 Replies)
Discussion started by: mac4rfree
9 Replies
5. Shell Programming and Scripting
FIle A
"A" 2 aa 34
3 ac
5 cd
"B" 3 hu 67
4 fg
5 gy
output shud be
A"" 2 aa 34
"A" 3 ac 34
"A" 5 cd 34
"B" 3 hu 67
"B" 4 fg 67
"B" 5 gy 67 (6 Replies)
Discussion started by: cdfd123
6 Replies
6. Shell Programming and Scripting
Hi,
I have a file, say files_list, as below (o/p of ls -R cmd)
$ cat files_list
/remote/dir/path/to/file:
sub-dir1
sub-dir2
sub-dir3
...
/remote/dir/path/to/file/sub-dir1:
remote_file1.csv.tgz
<blank line 1>
/remote/dir/path/to/file/sub-dir2:
remote_file2.csv.tgz
<blank... (3 Replies)
Discussion started by: dips_ag
3 Replies
7. Shell Programming and Scripting
Dear all
I want to search special string in file and then print next all line in one line until blank lines come. Help me plz for same. My input file and desire op file is as under.
i/p file:
A1/EXT "BSCABD1_21233G1" 757 130823 1157
RADIO X-CEIVER ADMINISTRATION
BTS EXTERNAL FAULT
... (7 Replies)
Discussion started by: jaydeep_sadaria
7 Replies
8. Shell Programming and Scripting
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
Discussion started by: Ferocci
8 Replies
9. Shell Programming and Scripting
Hello,
I have a file as :-
ABC
DEF
GHI
JKL
<BlankLine>
MNO
PQR
STU
VWX
<BlankLine>
YZA
I need it as below:-
ABCDEFGHIJKL;
MNOPQRSTUVWX; (3 Replies)
Discussion started by: jassi10781
3 Replies
10. Shell Programming and Scripting
Dear All,
In a CSV file, say that a given column has been extracted. In that column, information is missing (i.e. blank lines appear). I would like to replace the blank lines by the last valid line (not blank) previously read.
For example, consider the extract below:
123
234
543
111... (7 Replies)
Discussion started by: bagvian
7 Replies
LEARN ABOUT CENTOS
ocf_heartbeat_slapd
OCF_HEARTBEAT_SLAPD(7) OCF resource agents OCF_HEARTBEAT_SLAPD(7)
NAME
ocf_heartbeat_slapd - Manages a Stand-alone LDAP Daemon (slapd) instance
SYNOPSIS
slapd [start | stop | monitor | meta-data | validate-all]
DESCRIPTION
Resource script for Stand-alone LDAP Daemon (slapd). It manages a slapd instance as an OCF resource.
SUPPORTED PARAMETERS
slapd
Full path to the slapd binary. For example, "/usr/sbin/slapd".
(optional, string, default "/usr/sbin/slapd")
ldapsearch
Full path to the ldapsearch binary. For example, "/usr/bin/ldapsearch".
(optional, string, default "ldapsearch")
config
Full path to a slapd configuration directory or a slapd configuration file. For example, "/etc/ldap/slapd.d" or "/etc/ldap/slapd.conf".
(unique, optional, string, no default)
pidfile
File to read the PID from; read from olcPidFile/pidfile in config if not set.
(optional, string, no default)
user
User name or id slapd will run with. The group id is also changed to this user's gid, unless the group parameter is used to override.
(optional, string, no default)
group
Group name or id slapd will run with.
(optional, string, no default)
services
LDAP (and other scheme) URLs slapd will serve. For example, "ldap://127.0.0.1:389 ldaps:/// ldapi:///"
(unique, optional, string, default "ldap:///")
watch_suffix
Suffix (database backend) that will be monitored for availability. Multiple suffixes can be specified by providing a space seperated
list. By providing one or more suffixes here, the ignore_suffix parameter is discarded. All suffixes will be monitored if left blank.
(optional, string, no default)
ignore_suffix
Suffix (database backend) that will not be monitored for availability. Multiple suffixes can be specified by providing a space
seperated list. No suffix will be excluded if left blank.
(optional, string, no default)
bind_dn
Distinguished Name used to bind to the LDAP directory for testing. Leave blank to bind to the LDAP directory anonymously.
(optional, string, no default)
password
Password used to bind to the LDAP directory for testing.
(optional, string, no default)
parameters
slapd may be called with additional parameters. Specify any of them here.
(optional, string, no default)
stop_escalate
Number of seconds to wait for shutdown (using SIGTERM) before resorting to SIGKILL
(optional, integer, default 15)
SUPPORTED ACTIONS
This resource agent supports the following actions (operations):
start
Starts the resource. Suggested minimum timeout: 20s.
stop
Stops the resource. Suggested minimum timeout: 20s.
monitor
Performs a detailed status check. Suggested minimum timeout: 20s. Suggested interval: 60s.
validate-all
Performs a validation of the resource configuration. Suggested minimum timeout: 20s.
meta-data
Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5s.
EXAMPLE
The following is an example configuration for a slapd resource using the crm(8) shell:
primitive p_slapd ocf:heartbeat:slapd
op monitor depth="0" timeout="20s" interval="60s"
SEE ALSO
http://www.linux-ha.org/wiki/slapd_(resource_agent)
AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors)
resource-agents UNKNOWN 06/09/2014 OCF_HEARTBEAT_SLAPD(7)