12-14-2009
if i dont it prints the number that i have given ... not the first and the second field for example but the number 1 and 2.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a various files;each filled with hundreds of line with similar number of fields.
I would like to extract out field $5 from each of this file and aggregate them before printing out to a file.
I tried to :-
#!/usr/bin/awk -f
file="file1.txt file2.txt file3.txt file4.txt"
... (1 Reply)
Discussion started by: ahjiefreak
1 Replies
2. Shell Programming and Scripting
Hi All,
I have a string like below:
str="Hold=True Map=False 'This will map the data' Run=Yes Modify=False"
I want to print the field Run=Yes and retrive the value "Yes". I cannot use simple awk command because the position of the "Run" will be different at different times. Is there a way... (6 Replies)
Discussion started by: deepakgang
6 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I'm trying to print every line from first field to the fourth from a file containing more.
$ cat input
a b c d e f g
a b c d e f gI'm trying
awk '{for (i=1; i <= NF-3; i++) print $i}' awkTest.datbut it printsa
b
c
d
a
b
c
dSo, I easily guess I'm wrong. :)
Of course, I want:a b... (5 Replies)
Discussion started by: daPeach
5 Replies
4. UNIX for Advanced & Expert Users
894344202808090;11122;040320 075858 166;101;0;0;10u;0;NA;65;221890;2;101973;185059;568674;Y; PRE;0;0;NA;NA;0;NA;0;NA;textmsg;textmsg_snd1;telusmob;TEXTMSG1;0.15000000;126037;2010/03/04 12:58:57gmt;0;70532192;
plz tell me any awk command
which on the basis of the yellow field which is... (1 Reply)
Discussion started by: madfox
1 Replies
5. Shell Programming and Scripting
How do I print all the fields of a record except for the $(NF) field? (4 Replies)
Discussion started by: locoroco
4 Replies
6. Shell Programming and Scripting
I would like to print the number of records of 2 files, and divide the two numbers
awk '{print NR}' file1 > output1
awk '{print NR}' file2 > output2
paste output1 output2 > output
awl '{print $1/$2}' output > output_2
is there a faster way? (8 Replies)
Discussion started by: programmerc
8 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have below text file
01.02.2014,asdas,arse,aere,4tfsd
12.03.2014,sdte,45gf,8iuj,qw343w
01.02.0214,aetre,sdfgter,asfrwe
I have writen below code to print only first field that is only date field from text file
#!/bin/ksh
echo "enter week"
read week
while read -r... (6 Replies)
Discussion started by: stew
6 Replies
8. UNIX for Dummies Questions & Answers
I want to print line by line only the first field from txt file
input file
etr,t7tu,e45xdt,e45exgt,cdgfe
aqw34aw,45edgf,45estd,sert34
a232e,4etedf,w345er,qw345rw,
qw354,q34asf,tw45f,q3drsf
required o/p file
etr
aqw34aw
a232e
qw354 (1 Reply)
Discussion started by: stew
1 Replies
9. Shell Programming and Scripting
Hi
I want to use awk to match where field 3 contains a number within string - then print the line and just the number as a new field.
The source file is pipe delimited and looks something like
1|net|ABC Letr1|1530|||
1|net|EXP_1040 ABC|1121|||
1|net|EXP_TG1224|1122|||
1|net|R_North|1123|||... (5 Replies)
Discussion started by: Mudshark
5 Replies
10. Shell Programming and Scripting
Hi
I have attached txt file as input,
and i'm able to calculate sum of columns at the end but the format of sum is not coming up right.
awk -F"," '{for (i=4;i<=NF;i++) sum+=$i}{print}; END { sum="Total:"; for (i=1;i<=NF;i++) {printf sum ","} print "\n"}' input.txt
check the o/p file, at... (6 Replies)
Discussion started by: manas_ranjan
6 Replies
LEARN ABOUT X11R4
xgetdevicedontpropagatelist
XChangeDeviceDontPropagateList(3) X FUNCTIONS XChangeDeviceDontPropagateList(3)
NAME
XChangeDeviceDontPropagateList, XGetDeviceDontPropagateList - query or change the dont-propagate-list for extension devices
SYNTAX
int XChangeDeviceDontPropagateList(Display *display, Window *window, int *count, XEventClass *event_list, int mode);
XEventClass *XGetDeviceDontPropagateList(Display *display, Window *window, int *count);
ARGUMENTS
display Specifies the connection to the X server.
window Specifies the window whose dont-propagate-list is to be queried or modified.
event_list Specifies a pointer to a list of event classes.
mode Specifies the mode. You can pass AddToList , or DeleteFromList.
count Specifies the number of event classes in the list.
DESCRIPTION
The XChangeDeviceDontPropagateList request modifies the list of events that should not be propagated to ancestors of the event window.
This request allows extension events to be added to or deleted from that list. By default, all events are propagated to ancestor windows.
Once modified, the list remains modified for the life of the window. Events are not removed from the list because the client that added
them has terminated.
Suppression of event propagation is not allowed for all input extension events. If a specified event class is one that cannot be sup-
pressed, a BadClass error will result. Events that can be suppressed include DeviceKeyPress, DeviceKeyRelease, DeviceButtonPress, Device-
ButtonRelease, DeviceMotionNotify, ProximityIn, and ProximityOut.
XChangeDeviceDontPropagateList can generate a BadDevice, BadClass, or BadValue error.
The XGetDeviceDontPropagateList request queries the list of events that should not be propagated to ancestors of the event window.
XGetDeviceDontPropagateList can generate a BadClass or BadWindow error.
DIAGNOSTICS
BadDevice An invalid device was specified. The specified device does not exist or has not been opened by this client via XOpenInputDe-
vice. This error may also occur if some other client has caused the specified device to become the X keyboard or X pointer
device via the XChangeKeyboardDevice or XChangePointerDevice requests.
BadValue Some numeric value falls outside the range of values accepted by the request. Unless a specific range is specified for an
argument, the full range defined by the argument's type is accepted. Any argument defined as a set of alternatives can gener-
ate this error.
BadWindow An invalid window id was specified.
BadClass An invalid event class was specified.
SEE ALSO
Programming With Xlib
X Version 11 libXi 1.2.1 XChangeDeviceDontPropagateList(3)