03-27-2010
Hi, thank you vm for your reply..
As per our comany policies, we have to use awk scripting only..
And the given command is giving some syntax errors, can you please help?
$ awk -F":|@" '/master replica/{gsub("[ |<|>]","",$2);printf $2}/host/{gsub("[ |<|>]","",$2);printf "\t"$2"\n"}' cctpl.log #This file is attached in this thread#
awk: syntax error near line 1
awk: illegal statement near line 1
awk: syntax error near line 1
awk: illegal statement near line 1
$
Actually i want to create a file with all replicas in the input file like below,
---------
replica1
replica2
...
..
..
original
---------
At any cost, the input file must have one 'original' replica..
And the script has to return a value (which is coloured in red below) as an o/p under this original replica..
*****************example one*************
replica "original"
2005-11-02T22:51:59+11 by ************* (***-**-*-@/**/*/*/*/)
"<Original_replica>"
replica type: unfiltered
master replica: original@/vobs/<vob_name>
request for mastership: enabled
owner: laserdev
group: xxxxxxxxx
host: "<main_server_alias>" ---> I want to get this <main_server_alias> name as a o/p of the script
identities: preserved
permissions: preserved
feature level: 4
connectivity: connected
*************************************
I hope, you are clear in my requirment now..
Thank you vm again for your help on this...
Please let me know for any queries on this..
Regards,
Raghu
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
Can anyone show me how to list the below numbers in decending order?
I have a code to find out whats the largest number though but can it be modified to in-corporate in function ?
Thanks in advance
Input:
20
30
10
40
50
Output:
50
40
30
20 (2 Replies)
Discussion started by: Raynon
2 Replies
2. Shell Programming and Scripting
Hi,
Would anyone know how to compare two strings, and only throw an error if there were different words, not that the same words were in a different order?
e.g
"A B C" vs "B C A" ->OK
"A B C" vs "A D C" -> BAD
Thanks! (2 Replies)
Discussion started by: rebelbuttmunch
2 Replies
3. Shell Programming and Scripting
Hi -
I have a file with lots of lines in that I need to order based on the number of commas!
e.g the file looks something like :-
cn=john,cn=users,cn=uk,dc=dot,dc=com
cn=john,cn=users,dc=com
cn=users,cn=groups,dc=com
cn=john,cn=admins,cn=users,cn=uk,dc=dot,dc=com... (4 Replies)
Discussion started by: sniper57
4 Replies
4. Shell Programming and Scripting
I hava a file with following data:
number|CREDIT_ID|NULL
date|SYS_CREATION_DATE|NULL
varchar2|GGS_COMMIT_CHAR|NULL
varchar2|GGS_OP_TYPE|NULL
number|GGS_SCN|NULL|
number|GGS_LOG_SEQ|NULL
number|GGS_LOG_POS|NULL
number|GGS_ORACREC_SCN|NULL
varchar2|BATCH_ID|NULL
char|GGS_IMAGE_TYPE|NULL
... (6 Replies)
Discussion started by: kolesunil
6 Replies
5. Shell Programming and Scripting
hello,
i 'd like your help about a bash script which:
1. finds inside the html file (it is attached with my post) the code number of the Latest Stable Kernel,
2.finds the link which leads to the download location of the Latest Stable Kernel version,
(the right link should lead to the file... (3 Replies)
Discussion started by: alex83
3 Replies
6. UNIX for Dummies Questions & Answers
Hi again
I have figured out how to be able to sort through lines in a file with multiple words in any order and display them using this command:
cat file | grep -i $OPTION1 | grep -i $OPTION2 | grep -i $OPTION3 OPTION1 is 2008, OPTION2 is Mar, OPTION 3 is Tue
Result:
Tue Mar 25... (4 Replies)
Discussion started by: semaj
4 Replies
7. Shell Programming and Scripting
Hi,
I am using UBUNTU 12.04.
I have a dataset as follows:
Column#1 Column#2 Column#3 .... Column#50
1 154878
1 145145
2 189565
2 454121
... (5 Replies)
Discussion started by: Homa
5 Replies
8. Shell Programming and Scripting
I have this END section in an awk script:
END {
for (j in littlebin)
{
print (j, int(log(j)/log(2)) , littlebin)
lbsum+=littlebin
}
for (i in bins)
... (6 Replies)
Discussion started by: treesloth
6 Replies
9. Shell Programming and Scripting
is it possible to order the following row clusters from ascending to descending. thanx in advance
input
1 2 4 0
1 2 4 0
3 3 3 3
1 5 1 0
1 5 1 0
6 0 0 0
5 1 1 1... (4 Replies)
Discussion started by: quincyjones
4 Replies
10. Shell Programming and Scripting
Source file
portIndex: 75
portName: slot9 port11
c0:50:96:05:9f:f2:00:f2
c0:50:96:05:9f:f2:00:ea
c0:50:96:05:9f:f2:01:13
c0:50:96:05:9f:f2:01:12
c0:50:96:05:9f:f2:01:0b
c0:50:96:05:9f:f2:01:0a
c0:50:96:05:9f:f2:01:03
... (2 Replies)
Discussion started by: ranjancom2000
2 Replies
LEARN ABOUT HPUX
create_child
create child(1m) create child(1m)
NAME
create child - Creates a child pointer at the master replica of the parent directory
SYNOPSIS
cdscp create child child-name clearinghouse clearinghouse-name
ARGUMENTS
The full name of the child pointer. The full name of a clearinghouse that contains a replica of the child directory.
DESCRIPTION
The create child command creates a child pointer at the master replica of the parent directory. When CDS looks up a name in the namespace,
it uses child pointers to locate directory replicas. Use the set cdscp preferred clearinghouse command before issuing this command to
ensure that the request is directed to the master replica.
Privilege Required
You must have insert permission to the parent directory.
NOTES
Use the create child command only to re-create a child pointer that is accidentally deleted. This command is designed only for trou-
bleshooting.
This command will fail if the associated directory does not exist. If the associated directory exists, this command will return success-
fully.
This command is replaced at Revision 1.1 by the dcecp command and may not be provided in future releases of DCE.
EXAMPLE
The following command creates the child pointer in the parent directory /.:/subsys. It uses the replica located at the /.:/subsys/NY_CH
clearinghouse to fill in its replica set.
cdscp> create child /.:/subsys clearinghouse /.:/subsys/NY_CH
RELATED INFORMATION
Commands: delete child(1m), list child(1m), show child(1m)
create child(1m)