You are building a key with $3 and $4 where there exists only fields $1 $2 $3 with an unaltered field separator.
If I understood it correct, you might want something like this?
I am not sure if it makes sense to process $1 this way, since for example "Aahan Aabid" has 3 entries with 2 different numbers in front. If $1 makes a difference and needs to be printed, you might include $1 into the key instead of using it in a second array.
Hello,
My text file has input of the form
abc dft45.xml
ert rt653.xml
abc ert57.xml
I need to write a perl script/shell script to find duplicates in the first column and write it into a text file of the form...
abc dft45.xml
abc ert57.xml
Can some one help me plz? (5 Replies)
Given a file such as this I need to remove the duplicates.
00060011 PAUL BOWSTEIN ad_waq3_921_20100826_010517.txt
00060011 PAUL BOWSTEIN ad_waq3_921_20100827_010528.txt
0624-01 RUT CORPORATION ad_sade3_10_20100827_010528.txt
0624-01 RUT CORPORATION ... (13 Replies)
Hi,
I need an awk script (or whatever shell-construct) that would take data like below and get the max value of 3 column, when grouping by the 1st column.
clientname,day-of-month,max-users
-----------------------------------
client1,20120610,5
client2,20120610,2
client3,20120610,7... (3 Replies)
Hi,
I have a file (sorted by sort) with 8 tab delimited columns. The first column contains duplicated fields and I need to merge all these identical lines.
My input file:
comp100002 aaa bbb ccc ddd eee fff ggg
comp100003 aba aba aba aba aba aba aba
comp100003 fff fff fff fff fff fff fff... (5 Replies)
Hi, I have a file with +/- 13000 lines and 4 column. I need to search the 3rd column for a word that begins with "SAP-" and move/skip it to the next column (4th). Because the 3rd column need to stay empty.
Thanks in advance.:)
89653 36891 OTR-60 SAP-2
89653 36892 OTR-10 SAP-2... (2 Replies)
input
"A","B","C,D","E","F"
"S","T","U,V","W","X"
"AA","BB","CC,DD","EEEE","FFF"
required output:
"A","B","C,D","C,D","F"
"S", T","U,V","U,V","X"
"AA","BB","CC,DD","CC,DD","FFF"
tried using awk but double quotes not preserving for every field. any help to solve this is much... (5 Replies)
Hi Experts,
Please bear with me, i need help
I am learning AWk and stuck up in one issue.
First point : I want to sum up column value for column 7, 9, 11,13 and column15 if rows in column 5 are duplicates.No action to be taken for rows where value in column 5 is unique.
Second point : For... (1 Reply)
Hello Team,
My source data (INput) is like below
EPIC1 router EPIC2 Targetdefinition
Exp1 Expres rtr1 Router
SQL SrcQual Exp1 Expres
rtr1 Router EPIC1 Targetdefinition
My output like
SQL SrcQual Exp1 Expres
Exp1 Expres rtr1 Router
rtr1 Router EPIC1 Targetdefinition... (5 Replies)
Discussion started by: sekhar.lsb
5 Replies
LEARN ABOUT HPUX
makedbm
makedbm(1M)makedbm(1M)NAME
makedbm - make a Network Information System database
SYNOPSIS
nis_input_file] nis_output_name] nis_domain_name] nis_master_name] infile outfile
database_name
Remarks
The Network Information Service (NIS) was formerly known as Yellow Pages (yp). Although the name has changed, the functionality of the
service remains the same.
DESCRIPTION
generates databases (maps) for the Network Information System (NIS) from infile. A database created by consists of two files: and A data-
base contains records called dbm records composed of key-value pairs.
Each line of infile is converted to a single dbm record; all characters up to the first tab or space form the key, and the remainder of the
line is the value. If a value read from infile ends with the value for that record is continued onto the next line. The NIS clients must
interpret the character (which means that does not treat the as if it precedes a comment). If infile is a hyphen reads standard input.
always generates a special dbm record with the key whose value is the time of last modification of infile (or the current time, if infile
is This value is also known as the order number of a map, and prints it for a specified NIS map (see yppoll(1M)).
Another special dbm record created by has the key Its value is usually the host name retrieved by however, the option can be used to spec-
ify a different value (see gethostname(2)).
If the option is used, another special dbm record with the key is created. When this key exists in the NIS host.by* maps or ipnodes.by*
maps and the NIS host name resolution fails, the process will query the Internet domain name server, to provide the host name resolution.
Before using the option, it is recommended that the name services switch, be set to allow NIS host name resolution first. (Note that,
since the process only checks hosts.by* and ipnodes.by* for the existence of the key, using the option on any other NIS map will have no
effect. Also, the option should be used on both the *.byname and *.byaddr maps, not one exclusively.)
If the option is used, another special dbm record created is the key. If this key exists in an NIS map, will only allow privileged pro-
cesses (applications that can create reserved ports) to access the data within the map.
Options
recognizes the following options and command-line arguments.
Create a special dbm record with the key
This key, which is in the hosts.byname, hosts.byaddr, ipnodes.byname, and ipnodes.byaddr maps, allows the process to query the
Internet domain name server (see named(1M)).
Convert the keys of the given map to lowercase.
This command option allows host name matches to work independent of character-case distinctions.
Accept connections from secure NIS networks only.
Create a special dbm record with the key
and the value If the option is used, another special dbm record created is the key. If this key exists in an NIS map, will only
allow privileged processes to access the data within the map (that is, applications that can create reserved ports).
Create a special dbm record with the key
and the value nis_output_name.
Create a special dbm record with the key
and the value nis_domain_name.
Replace the value of the special dbm record whose key is
with nis_master_name.
Undo the
database_name (that is, write the contents of database_name to the standard output) one dbm record per line. A single space sepa-
rates each key from its value.
EXAMPLES
Shell scripts can be written to convert ASCII files such as to the key-value form used by For example,
#!/usr/bin/sh
/usr/bin/awk 'BEGIN { FS = ":" } { print $1, $0 }'
/etc/netgroup |
makedbm - netgroup
converts the file to a form that is read by to make the NIS map The keys in the database are names, and the values are the remainders of
the lines in the file.
AUTHOR
was developed by Sun Microsystems, Inc.
SEE ALSO domainname(1), named(1M), ypinit(1M), ypmake(1M), yppoll(1M), gethostname(2), netgroup(4), ypfiles(4).
makedbm(1M)