10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
file:
Data has to be grouped on 1st field; And in each group, print 2nd field IF 1st field doesn't match with any of the values in 2nd field..
o/p to be:
I ended up writing as below, any help ??
awk -F, '!($1 in a){a++;}END{for (i in a)print i}' file (3 Replies)
Discussion started by: JSKOBS
3 Replies
2. Shell Programming and Scripting
Hi all,
I've data as:
22 51018157 51018157 exonic CHKB nonsynonymous SNV
22 51018204 51018204 exonic CHKB nonsynonymous SNV
22 51018428 51018428 exonic CHKB nonsynonymous SNV
22 51018814 51018814 ... (4 Replies)
Discussion started by: genome
4 Replies
3. Shell Programming and Scripting
hi all
below is the input file contains a code followed by amount
input file
345,5.86
346,20.58
399,10.00
400,12.00
i need the output in the following way outputfile
totalsumof345and346,26.44
totalsumof399and400,22.00 (10 Replies)
Discussion started by: hemanthsaikumar
10 Replies
4. Shell Programming and Scripting
Hi Gurus,
I'm scratching my head over and over and couldn't find the the right way to compose this AWK properly - PLEASE HELP :confused:
Input:
c,d,e,CLICK
a,b,c,CLICK
a,b,c,CONV
c,d,e,CLICK
a,b,c,CLICK
a,b,c,CLICK
a,b,c,CONV
b,c,d,CLICK
c,d,e,CLICK
c,d,e,CLICK
b,c,d,CONV... (6 Replies)
Discussion started by: Royi
6 Replies
5. Shell Programming and Scripting
How do i print the last record of a group in a file ?
For example, I have a file like this :
cat txt
cucm1,location1,1,2,3
cucm2,location1,3,4,5
cucm1,location1,10,20,30
cucm2,location2,30,40,50
I am expecting a command that would print the last record of the group.
For example, ... (2 Replies)
Discussion started by: Lakshmikumari
2 Replies
6. Shell Programming and Scripting
Hi,
I have file with below format and sample data - File is pipe delimited
Col1|col2|Account|Bal1|Bal2
1|2|1|10|5
1|2|2|10|2
1|3|3|10|3
I want output as
SUM|1|2|2|20|7
SUM|1|3|1|10|3
Can anyone give me awk command (4 Replies)
Discussion started by: sanranad
4 Replies
7. Shell Programming and Scripting
Hi All,
I have a file in the following format...
*****************************************************
11/10/27 12:09 : Input Record 11/10/27 12:10 : Input Record 11/10/27 12:10 : Input Record 11/10/27 12:10 : Input Record 11/10/27 12:10 : Input Record 11/10/27 12:10 : Input... (2 Replies)
Discussion started by: sraj142
2 Replies
8. Infrastructure Monitoring
I have a file has following records
policy glb id 1233 name Permit ping from "One" to "Second" "Address1" "Any" "ICMP-ANY" permit
policy id 999251
service "snmp-udp"
exit
policy glb id 1234 name Permit telnet from "One" to "Second" "Address2" "Any" "TCP-ANY" permit
policy id 1234... (3 Replies)
Discussion started by: baskar
3 Replies
9. Shell Programming and Scripting
Hi,
Suppose if i am having a file with following records as given below.
5555
6756
5555
4555
4555
6767
how can i get the count of each record using AWK.
Eg:5555 count should be 2
4555 count should be 2
6767 count should be 1
... (5 Replies)
Discussion started by: tinivt
5 Replies
10. Shell Programming and Scripting
Hi,
Need awk help to group and print lines to format the output as shown below
INPUT FORMAT
set echo on
set heading on
set spool on
/* SCHEMA1 */ CREATE TABLE T1;
/* SCHEMA1 */ CREATE TABLE T2;
/* SCHEMA1 */ CREATE TABLE T3;
/* SCHEMA1 */ CREATE TABLE T4;
/* SCHEMA1 */ CREATE TABLE T5;... (5 Replies)
Discussion started by: rajan_san
5 Replies
VITE(1) ViTE Manual Pages VITE(1)
..___________..._
__vXXX=========onn=XX=X=s_..
_a=X=============v:|||||i:lvvn=Xn_,
"!XX===========v||||||||||||iiiv=Xn_
-"!XX======v||||||||||||iii:::vn=Xs
""!!!Zl|||||||||||iii::lIlvvnXX,.
Jl||||||||||i:vvvvlIvvvvv=Zc
_e|||||||||ia}"""""!=anvnvnnXno=========aa_.
]l||||||||v}' "Xnnnnnn=o=====XXXX=adZ=__
=||||||||n( .3nnnon=======X=Xs..___X|%!n_,
)1||||||i;^ 3=noo=======X=XXXZ1v|i|||||iIs,
X||||||a! 3=n========X=X=X=Ii||||||||||iIs,
.Jl|||va! .==o=o=====X=XXX=li|||||||||||||i3..
)na:!"` =========X=XX=1:|||||||||||||||||)a
.. .========X=XXIIi||||||||||||||||||v}
X=====X=X=1l|i|||||||||||||<a>}""^
.X===X==1Ii||||||||||||<a>""`:
+X=nI:i|||:llv_asl}"""`
-ni||<c"^.
-1%<e.
!3`
NAME
vite - a visual trace explorer
SYNOPSIS
vite
vite -h
vite [-f|-a] file_path [-e export_path] [-t [time_init]:[time_end]]
DESCRIPTION
ViTE is a visual trace explorer. It is a useful tool for profiling and debugging parallel programs (multi-process or multi-core).
ViTE reads program execution trace data from file (currently in Paje trace format) and display it in a graphical interface. Program execu-
tion data could be a state (drawn as a colored rectangle - color depends of the kind of state), an event (drawn as a green disc) or a com-
munication between two processes (drawn as a white arrow).
OPTIONS
ViTE accepts the following options:
-h Display help.
-f file_path
Open the file_path file.
-a file_path
Open the file_path file and display it entirely.
-e export_path
Export the opened trace file (with -f or -a option) to the export_path file in SVG format.
-t [time_init]:[time_end]
Just parse trace from time_init to time_end.
If time_init is missed, trace will be parsed from the minimum time to time_end.
If time_end is missed, trace will be parsed from time_init to the maximum time.
AUTHORS
ViTE was created by a group of french engineering school students for the INRIA research center.
REPORTING BUGS
Report bugs to ViTE developers <vite-developpeurs@lists.gforge.inria.fr>.
COPYRIGHT
ViTE was released under the CeCILL-A licence. The content can be found here: http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt.
Copyright (C) 2009 Kevin COULOMB
Copyright (C) 2009 Johnny JAZEIX
Copyright (C) 2009 Olivier LAGRASSE
Copyright (C) 2009 Jule MARCOUEILLE
Copyright (C) 2009 Pascal NOISETTE
Copyright (C) 2009 Arthur REDONDY
Copyright (C) 2009 Clement VUCHENER
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Version 1.2 April 2009 VITE(1)