I have file which contains data based on tags. Output of the file should be in order of tags.
Below are the files :
Tags.txt
Original data is like this :
Data.txt
And, Output should be like this :
Expected Result -
I was thinking of using associative array in AWK. But, not able to do it properly. Can someone please help?
Hi Gurus,
I have a text file that I want to process with the following structure;
4528788 Blah - Something
9341423 Text - Somethinghere
98792223,5546761 Some - More - Text
5119503,5159504,1234567 Text - More - Text
13459695 Stuff - Text Again
13526583 Junk - More Text Here
13595177... (1 Reply)
Hi gang.
I'm using a unix/mac system and i'm trying to sort a file (more than 1,000,000 lines).
chr1 100000965 100001001 -
chr1 100002155 100002191 +
chr1 100002165 100002201 +
chr1 100002525 100002561 -
chr1 10000364 ... (2 Replies)
Hi all,
in my csv file it'll look like this, and of course it may have more columns
US to UK;abc-hq-jcl;multimedia
UK to CN;def-ny-jkl;standard
DE to DM;abc-ab-klm;critical
FD to YM;la-yr-tym;standard
HY to MC;la-yr-ytm;multimedia
GT to KJ;def-ny-jrt;critical
I would like to group... (4 Replies)
Hi
I have some files in directory and the names of files are like
jnhld_15233_2010-11-23
jnhld_15233_2007-10-01
jnhld_15233_2001-05-04
jnhld_15233_2011-11-11
jnhld_15233_2005-06-07
jnhld_15233_2000-04-01
..etc
How can i sort these files based on the date in the file name so that ... (4 Replies)
I have a tab delimited file with 5 columns
79 A B 20.2340 6.1488 8.5086 1.3838
87 A B 0.1310 0.0382 0.0054 0.1413
88 A B 46.1651 99.0000 21.8107 0.2203
89 A B 0.1400 0.1132 0.0151 0.1334
114 A B 0.1088 0.0522 0.0057 0.1083
115 A B... (2 Replies)
I would like to sort a tab delimited text file based on the absolute value of its second column. How do I go about doing that? Thanks!
Example input:
A -12
B 0
C -6
D 7
Output:
A -12
D 7
C -6
B 0 (4 Replies)
Hi team,
We have few files landing to our server based on sequence number. These files have to be processed in the sequence number order. Once the sequence number has reached its maximum, the files with sequence number 0000 has to be processed.
For example:
IN9997
IN9998
IN9999
IN0000... (7 Replies)
Hi,
I use UBUNTU 12.04.
I have a file with this structure:
Name 2 1245787 A G 12 14 12 14 ....
Name 1 1245789 C T 13 12 12 12.....
I would like to sort my file based on the second column so to have this output for example:
Name 1 1245789 C T 13 12 12 12.....
Name 2 1245787 A G 12 14... (4 Replies)
Hi,
I have two pipe separated files as below:
head -3 file1.txt
"HD"|"Nov 11 2016 4:08AM"|"0000000018"
"DT"|"240350264"|"56432"
"DT"|"240350264"|"56432"
head -3 file2.txt
"HD"|"Nov 15 2016 2:18AM"|"0000000019"
"DT"|"240350264"|"56432"
"DT"|"240350264"|"56432"
I want to list the... (6 Replies)
Hi All
I have a requirement to list all the files in chronological order based on the date value in the file name.For ex if I have three files as given below
ABC_TEST_20160103_1012.txt
ABC_TEST_20160229_1112.txt
ABC_TEST_20160229_1112.txt
I have written code as given below to list out... (2 Replies)
Discussion started by: ginrkf
2 Replies
LEARN ABOUT OSX
bindtags
bindtags(n) Tk Built-In Commands bindtags(n)
__________________________________________________________________________________________________________________________________________________NAME
bindtags - Determine which bindings apply to a window, and order of evaluation
SYNOPSIS
bindtags window ?tagList?
_________________________________________________________________DESCRIPTION
When a binding is created with the bind command, it is associated either with a particular window such as .a.b.c, a class name such as But-
ton, the keyword all, or any other string. All of these forms are called binding tags. Each window contains a list of binding tags that
determine how events are processed for the window. When an event occurs in a window, it is applied to each of the window's tags in order:
for each tag, the most specific binding that matches the given tag and event is executed. See the bind command for more information on the
matching process.
By default, each window has four binding tags consisting of the name of the window, the window's class name, the name of the window's near-
est toplevel ancestor, and all, in that order. Toplevel windows have only three tags by default, since the toplevel name is the same as
that of the window. The bindtags command allows the binding tags for a window to be read and modified.
If bindtags is invoked with only one argument, then the current set of binding tags for window is returned as a list. If the tagList argu-
ment is specified to bindtags, then it must be a proper list; the tags for window are changed to the elements of the list. The elements of
tagList may be arbitrary strings; however, any tag starting with a dot is treated as the name of a window; if no window by that name
exists at the time an event is processed, then the tag is ignored for that event. The order of the elements in tagList determines the
order in which binding scripts are executed in response to events. For example, the command
bindtags .b {all . Button .b}
reverses the order in which binding scripts will be evaluated for a button named .b so that all bindings are invoked first, following by
bindings for .b's toplevel ("."), followed by class bindings, followed by bindings for .b. If tagList is an empty list then the binding
tags for window are returned to the default state described above.
The bindtags command may be used to introduce arbitrary additional binding tags for a window, or to remove standard tags. For example, the
command
bindtags .b {.b TrickyButton . all}
replaces the Button tag for .b with TrickyButton. This means that the default widget bindings for buttons, which are associated with the
Button tag, will no longer apply to .b, but any bindings associated with TrickyButton (perhaps some new button behavior) will apply.
EXAMPLE
If you have a set of nested frame widgets and you want events sent to a button widget to also be delivered to all the widgets up to the
current toplevel (in contrast to Tk's default behavior, where events are not delivered to those intermediate windows) to make it easier to
have accelerators that are only active for part of a window, you could use a helper procedure like this to help set things up:
proc setupBindtagsForTreeDelivery {widget} {
set tags [list $widget [winfo class $widget]]
set w $widget
set t [winfo toplevel $w]
while {$w ne $t} {
set w [winfo parent $w]
lappend tags $w
}
lappend tags all
bindtags $widget $tags
}
SEE ALSO
bind(n)
KEYWORDS
binding, event, tag
Tk 4.0 bindtags(n)