Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Compare values in multiple rows in one column using awk Post 303043945 by RudiC on Tuesday 11th of February 2020 04:19:50 PM
Old 02-11-2020
Please be way more specific. What does "where the different is > 1" mean? How does this show up in your desired output? Which of the four lines should be printed? In your attempt, you reference $10 which doesn't exist in your input sample, and only in the first line, although empty, in your desired output.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Compare two files using awk or sed, add values in a column if their previous fields are same

Hi All, I have two files file1: abc,def,ghi,5,jkl,mno pqr,stu,ghi,10,vwx,xyz cba,ust,ihg,4,cdu,oqw file2: ravi,def,kishore ramu,ust,krishna joseph,stu,mike I need two output files as follows In my above example, each row in file1 has 6 fields and each row in file2 has 3... (1 Reply)
Discussion started by: yerruhari
1 Replies

2. UNIX for Dummies Questions & Answers

Compare two files using awk or sed, add values in a column if their previous fields are same

Hi All, I have two files file1: abc,def,ghi,5,jkl,mno pqr,stu,ghi,10,vwx,xyz cba,ust,ihg,4,cdu,oqw file2: ravi,def,kishore ramu,ust,krishna joseph,stu,mike I need two output files as follows In my above example, each row in file1 has 6 fields and each row in file2 has 3... (1 Reply)
Discussion started by: yerruhari
1 Replies

3. Shell Programming and Scripting

Compare two files using awk or sed, add values in a column if their previous fields are same

Hi All, I have two files file1: abc,def,ghi,5,jkl,mno pqr,stu,ghi,10,vwx,xyz cba,ust,ihg,4,cdu,oqw file2: ravi,def,kishore ramu,ust,krishna joseph,stu,mike I need two output files as follows In my above example, each row in file1 has 6 fields and each row in file2 has 3... (3 Replies)
Discussion started by: yerruhari
3 Replies

4. Shell Programming and Scripting

How to compare the values of a column in awk in a same file and consecutive lines..

I would like to compare the values of 2nd column of consecutive lines of same file in such a way so that if the difference between first value and second value is more than 100 it should print complete line else ignore line. Input File ========== PDB 2500 RTDB 123 RTDB-EAGLE 122 VSCCP 2565... (4 Replies)
Discussion started by: manuswami
4 Replies

5. Shell Programming and Scripting

Compare values in two files. For matching rows print corresponding values from File 1 in File2.

- I have two files (File 1 and File 2) and the contents of the files are mentioned below. - I am trying to compare the values of Column1 of File1 with Column1 of File2. If a match is found, print the corresponding value from Column2 of File1 in Column5 of File2. - I tried to modify and use... (10 Replies)
Discussion started by: Santoshbn
10 Replies

6. UNIX for Dummies Questions & Answers

Compare values of fields from same column with awk

Hi all ! If there is only one single value in a column (e.g. column 1 below), then return this value in the same output column. If there are several values in the same column (e.g. column 2 below), then return the different values separated by "," in the output. pipe-separated input: ... (11 Replies)
Discussion started by: lucasvs
11 Replies

7. Shell Programming and Scripting

awk Print New Column For Every Two Lines and Match On Multiple Column Values to print another column

Hi, My input files is like this axis1 0 1 10 axis2 0 1 5 axis1 1 2 -4 axis2 2 3 -3 axis1 3 4 5 axis2 3 4 -1 axis1 4 5 -6 axis2 4 5 1 Now, these are my following tasks 1. Print a first column for every two rows that has the same value followed by a string. 2. Match on the... (3 Replies)
Discussion started by: jacobs.smith
3 Replies

8. Shell Programming and Scripting

How to compare the values of a column in a same file using awk?

Dear Unix experts, I have got a file where I would like to compare the values of second column if first column is same in such a way that the difference between the values is >50. If not, I would like to discard both values. For example, my input file looks like - comp275_c0_seq2 73... (7 Replies)
Discussion started by: utritala
7 Replies

9. Shell Programming and Scripting

Compare two files column values using awk

Judi # cat File1 judi /export/home 76 judi /usr 83 judi # judi # cat File2 judi /export/home 79 judi /usr 82 judi # if COLUMN3 of File2 is greater that COLUMN3 of File1, then print File2's lines juid /export/home 79 Code tags please (2 Replies)
Discussion started by: judi
2 Replies
Gtk2::Table(3)						User Contributed Perl Documentation					    Gtk2::Table(3)

NAME
Gtk2::Table HIERARCHY
Glib::Object +----Glib::InitiallyUnowned +----Gtk2::Object +----Gtk2::Widget +----Gtk2::Container +----Gtk2::Table INTERFACES
Glib::Object::_Unregistered::AtkImplementorIface Gtk2::Buildable METHODS
widget = Gtk2::Table->new ($rows, $columns, $homogeneous=FALSE) o $rows (integer) o $columns (integer) o $homogeneous (boolean) $table->attach ($child, $left_attach, $right_attach, $top_attach, $bottom_attach, $xoptions, $yoptions, $xpadding, $ypadding) o $child (Gtk2::Widget) o $left_attach (integer) o $right_attach (integer) o $top_attach (integer) o $bottom_attach (integer) o $xoptions (Gtk2::AttachOptions) o $yoptions (Gtk2::AttachOptions) o $xpadding (integer) o $ypadding (integer) $table->attach_defaults ($widget, $left_attach, $right_attach, $top_attach, $bottom_attach) o $widget (Gtk2::Widget) o $left_attach (integer) o $right_attach (integer) o $top_attach (integer) o $bottom_attach (integer) integer = $table->get_col_spacing ($column) o $column (integer) $table->set_col_spacing ($column, $spacing) o $column (integer) o $spacing (integer) $table->set_col_spacings ($spacing) o $spacing (integer) integer = $table->get_default_col_spacing integer = $table->get_default_row_spacing boolean = $table->get_homogeneous $table->set_homogeneous ($homogeneous) o $homogeneous (boolean) $table->resize ($rows, $columns) o $rows (integer) o $columns (integer) integer = $table->get_row_spacing ($row) o $row (integer) $table->set_row_spacing ($row, $spacing) o $row (integer) o $spacing (integer) $table->set_row_spacings ($spacing) o $spacing (integer) PROPERTIES
'column-spacing' (Glib::UInt : readable / writable / private) The amount of space between two consecutive columns 'homogeneous' (boolean : readable / writable / private) If TRUE, the table cells are all the same width/height 'n-columns' (Glib::UInt : readable / writable / private) The number of columns in the table 'n-rows' (Glib::UInt : readable / writable / private) The number of rows in the table 'row-spacing' (Glib::UInt : readable / writable / private) The amount of space between two consecutive rows ENUMS AND FLAGS
flags Gtk2::AttachOptions o 'expand' / 'GTK_EXPAND' o 'shrink' / 'GTK_SHRINK' o 'fill' / 'GTK_FILL' SEE ALSO
Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container COPYRIGHT
Copyright (C) 2003-2008 by the gtk2-perl team. This software is licensed under the LGPL. See Gtk2 for a full notice. perl v5.12.1 2010-07-05 Gtk2::Table(3)
All times are GMT -4. The time now is 08:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy