Your code works. Thanks !
But I would like to understand why mine does not. It seems fine to me...
Hello becal123456,
IMHO problem in your code is that you haven't done any increment on very first occurrence of a[$2 FS $4 FS $5 FS $6 FS $7] and when it goes into condition check happens first and increment for that line's field happens later hence false positive results are coming, so if you change your code to following:
Then we are doing increment in array a[$2 FS $4 FS $5 FS $6 FS $7]++ so when it goes to next time in grep2 condition it has those values also which are common in grep1 line(which were getting missed since we haven't put increment in its previous statement).
I hope we should be good here, please feel free to shoot any further queries on same.
NOTE: To say anyone "Thanks" on UNIX.com you can hit THANKS button; present at every post's left corner
Thanks,
R. Singh
This User Gave Thanks to RavinderSingh13 For This Post:
Hi Everyone,
I have a flat file of 1000 unique records like following : For eg
Andy,Flower,201-987-0000,12/23/01
Andrew,Smith,101-387-3400,11/12/01
Ani,Ross,401-757-8640,10/4/01
Rich,Finny,245-308-0000,2/27/06
Craig,Ford,842-094-8740,1/3/04
.
.
.
.
.
.
Now I want to duplicate... (9 Replies)
Hi:
I've been searching the net but didnt find a clue. I have a file in which, for some records, some fields coincide. I want to compare one (or more) of the dissimilar fields and retain the one record that fulfills a certain condition. For example, on this file:
99 TR 1991 5 06 ... (1 Reply)
I have a .DAT file like below
23666483030000653-B94030001OLFXXX000000120081227
23797049900000654-E71060001OLFXXX000000220081227
23699281320000655 E71060002OLFXXX000000320081227
22885068900000652 B86860003OLFXXX592123320081227
22885068900000652 B86860003ODL-SP592123420081227... (8 Replies)
Hi,
I have a file with these records
abc
xyz
xyz
pqr
uvw
cde
cde
In my o/p file , I want all the non duplicate rows to be shown.
o/p abc
pqr
uvw
Any suggestions how to do this?
Thanks for the help.
rs (2 Replies)
Consider my input is
10
10
20
then,
uniq -u will give 20 and uniq -dwill return 10.
But i need the output as ,
10
10
How we can achieve this?
Thanks (4 Replies)
Hi,
In a file, I have to mark duplicate records as 'D' and the latest record alone as 'C'.
In the below file, I have to identify if duplicate records are there or not based on Man_ID, Man_DT, Ship_ID and I have to mark the record with latest Ship_DT as "C" and other as "D" (I have to create... (7 Replies)
I have 2 files
"File 1" is delimited by ";" and "File 2" is delimited by "|".
File 1 below (3 record shown):
Doc1;03/01/2012;New York;6 Main Street;Mr. Smith 1;Mr. Jones
Doc2;03/01/2012;Syracuse;876 Broadway;John Davis;Barbara Lull
Doc3;03/01/2012;Buffalo;779 Old Windy Road;Charles... (2 Replies)
Hi,
i am working on a script that would remove records or lines in a flat file. The only difference in the file is the "NOT NULL" word. Please see below example of the input file.
INPUT FILE:>
CREATE a
(
TRIAL_CLIENT NOT NULL VARCHAR2(60),
TRIAL_FUND NOT NULL... (3 Replies)
Gents,
I have a file which contends duplicate records in column 1, but the values in column 2 are different.
3099753489 3
3099753489 5
3101954341 12
3101954341 14
3102153285 3
3102153285 5
3102153297 3
3102153297 5
I will like to get something like this:
output desired... (16 Replies)
Gents,
Please give a help
file
--BAD STATUS NOT RESHOOTED--
*** VP 41255/51341 in sw 2973
*** VP 41679/51521 in sw 2973
*** VP 41687/51653 in sw 2973
*** VP 41719/51629 in sw 2976
--BAD COG NOT RESHOOTED--
*** VP 41689/51497 in sw 2974
*** VP 41699/51677 in sw 2974
*** VP... (18 Replies)
Discussion started by: jiam912
18 Replies
LEARN ABOUT REDHAT
xmscrollbarsetvalues
XmScrollBarSetValues(library call) XmScrollBarSetValues(library call)
NAME
XmScrollBarSetValues -- A ScrollBar function that changes ScrollBar's increment values and the slider's size and position
SYNOPSIS
#include <Xm/ScrollBar.h>
void XmScrollBarSetValues (widget, value, slider_size, increment, page_increment,
notify)
Widget widget;
int value;
int slider_size;
int increment;
int page_increment;
Boolean notify;
(void)
DESCRIPTION
XmSetScrollBarValues changes the ScrollBar's increment values and the slider's size and position. The scroll region is overlaid with a
slider bar that is adjusted in size and position using the main ScrollBar or set slider function attributes.
widget Specifies the ScrollBar widget ID.
value Specifies the ScrollBar's slider position. Refer to the XmNvalue resource described on XmScrollBar(3).
slider_size
Specifies the size of the slider. Refer to the XmNsliderSize resource described on XmScrollBar(3). This argument sets that
resource. Specify a value of 0 (zero) if you do not want to change the value.
increment Specifies the amount of button increment and decrement. Refer to the XmNincrement resource described on XmScrollBar(3). This
argument sets that resource. Specify a value of 0 (zero) if you do not want to change the value.
page_increment
Specifies the amount of page increment and decrement. Refer to the XmNpageIncrement resource described on XmScrollBar(3). This
argument sets that resource. Specify a value of 0 (zero) if you do not want to change the value.
notify Specifies a Boolean value that, when True, indicates a change in the ScrollBar value and also specifies that the ScrollBar widget
automatically activates the XmNvalueChangedCallback with the recent change. If it is set to False, it specifies any change that
has occurred in the ScrollBar's value, but does not activate XmNvalueChangedCallback.
For a complete definition of ScrollBar and its associated resources, see XmScrollBar(3).
RELATED XmScrollBar(3).
XmScrollBarSetValues(library call)