Sponsored Content
Top Forums Shell Programming and Scripting Compare 2 columns from the same file and print a value depending on the result Post 303003030 by ksennin on Wednesday 6th of September 2017 08:12:21 PM
Old 09-06-2017
Thank you very much for the clarification!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

compare columns from seven files and print the output

Hi guys, I need some help to come out with a solution . I have seven such files but I am showing only three for convenience. filea a5 20 a8 16 fileb a3 42 a7 14 filec a5 23 a3 07 The output file shoud contain the data in table form showing first field of... (7 Replies)
Discussion started by: smriti_shridhar
7 Replies

2. UNIX for Dummies Questions & Answers

find common lines using just one column to compare and result with all columns

Hi. If we have this file A B C 7 8 9 1 2 10 and this other file A C D F 7 9 2 3 9 2 3 4 The result i´m looking for is intersection with A B C D F so the answer here will be (10 Replies)
Discussion started by: alcalina
10 Replies

3. Shell Programming and Scripting

Compare selected columns from a file and print difference

I have learned file comparison from my previous post here. Then, it is comparing the whole line. Now, i have a new problem. I have two files with 3 columns separated with a "|". What i want to do is to compare the second and third column of file 1, and the second and third column of file 2. And... (4 Replies)
Discussion started by: kingpeejay
4 Replies

4. Shell Programming and Scripting

compare two columns of different files and print the matching second file..

Hi, I have two tab separated files; file1: S.No ddi fi cu o/l t+ t- 1 0.5 0.6 o 0.1 0.2 2 0.2 0.3 l 0.3 0.4 3 0.5 0.8 l 0.1 0.6 ... (5 Replies)
Discussion started by: vasanth.vadalur
5 Replies

5. Shell Programming and Scripting

Compare columns 2 files and print

File 1 has 16 columns so does File 2 I want to remove all records from File 2 that column 1 and column 16 match between file 1 and file 2 delimter of files is ~ (10 Replies)
Discussion started by: sigh2010
10 Replies

6. Shell Programming and Scripting

awk: print columns depending on their number

hi guys, i have the following problem: i have a matrix with 3 columns and over 450 rows like this: 0.0165 0.0151 0.0230 0.0143 0.0153 0.0134 0.0135 0.0123 0.0195 0.0173 0.0153 0.0182 i now want to calculate the average of every line and divide every element of this... (1 Reply)
Discussion started by: waddle
1 Replies

7. Shell Programming and Scripting

awk compare specific columns from 2 files, print new file

Hello. I have two files. FILE1 was extracted from FILE2 and modified thanks to help from this post. Now I need to replace the extracted, modified lines into the original file (FILE2) to produce the FILE3. FILE1 1466 55.27433 14.72050 -2.52E+03 3.00E-01 1.05E+04 2.57E+04 1467 55.27433... (1 Reply)
Discussion started by: jm4smtddd
1 Replies

8. Shell Programming and Scripting

Compare columns of multiple files and print those unique string from File1 in an output file.

Hi, I have multiple files that each contain one column of strings: File1: 123abc 456def 789ghi File2: 123abc 456def 891jkl File3: 234mno 123abc 456def In total I have 25 of these type of file. (5 Replies)
Discussion started by: owwow14
5 Replies

9. Shell Programming and Scripting

[Solved] awk compare two different columns of two files and print all from both file

Hi, I want to compare two columns from file1 with another two column of file2 and print matched and unmatched column like this File1 1 rs1 abc 3 rs4 xyz 1 rs3 stu File2 1 kkk rs1 AA 10 1 aaa rs2 DD 20 1 ccc ... (2 Replies)
Discussion started by: justinjj
2 Replies

10. Shell Programming and Scripting

Split a non delimited file into columns depending on user input

I would like some advice on some code. I want to write a small script that will take an input file of this format 111222233334444555666661112222AAAA 2222333445556612323244455445454545 2334556345643534505435345353453453 (and so on) It will be called as : script inputfile X (where X is... (5 Replies)
Discussion started by: onlyforbopi
5 Replies
Test::CPAN::Meta::YAML::Version(3pm)			User Contributed Perl Documentation		      Test::CPAN::Meta::YAML::Version(3pm)

NAME
Test::CPAN::Meta::YAML::Version - Validate META.json elements. SYNOPSIS
use Test::CPAN::Meta::YAML::Version; DESCRIPTION
This module was written to ensure that a META.yml file, provided with a standard distribution uploaded to CPAN, meets the specifications that are slowly being introduced to module uploads, via the use of ExtUtils::MakeMaker, Module::Build and Module::Install. This module is meant to be used together with Test::CPAN::Meta::YAML, however the code is self contained enough that you can access it directly. See CPAN::Meta for further details of the CPAN Meta Specification. ABSTRACT
Validation of META.yml data against the CPAN Meta Specification. CLASS CONSTRUCTOR
o new( yaml => $yaml [, spec => $version] ) The constructor must be passed a valid YAML data structure. Optionally you may also provide a specification version. This version is then use to ensure that the given YAML data structure meets the respective specification definition. If no version is provided the module will attempt to deduce the appropriate specification version from the data structure itself. METHODS
Main Methods o parse() Using the YAML data structure provided with the constructure, attempts to parse and validate according to the appropriate specification definition. Returns 1 if any errors found, otherwise returns 0. o errors() Returns a list of the errors found during parsing. Check Methods o check_map($spec,$data) Checks whether a map (or hash) part of the YAML data structure conforms to the appropriate specification definition. o check_list($spec,$data) Checks whether a list (or array) part of the YAML data structure conforms to the appropriate specification definition. Validator Methods o header($self,$key,$value) Validates that the YAML header is valid. Note: No longer used as we now read the YAML data structure, not the file. o url($self,$key,$value) Validates that a given value is in an acceptable URL format o urlspec($self,$key,$value) Validates that the URL to a META.yml specification is a known one. o string_or_undef($self,$key,$value) Validates that the value is either a string or an undef value. Bit of a catchall function for parts of the data structure that are completely user defined. o string($self,$key,$value) Validates that a string exists for the given key. o file($self,$key,$value) Validate that a file is passed for the given key. This may be made more thorough in the future. For now it acts like &string. o exversion($self,$key,$value) Validates a list of versions, e.g. '<= 5, >=2, ==3, !=4, >1, <6, 0'. o version($self,$key,$value) Validates a single version string. Versions of the type '5.8.8' and '0.00_00' are both valid. A leading 'v' like 'v1.2.3' is also valid. o boolean($self,$key,$value) Validates for a boolean value. Currently these values are '1', '0', 'true', 'false', however the latter 2 may be removed. o license($self,$key,$value) Validates that a value is given for the license. Returns 1 if an known license type, or 2 if a value is given but the license type is not a recommended one. o resource($self,$key,$value) Validates that the given key is in CamelCase, to indicate a user defined keyword. o keyword($self,$key,$value) Validates that key is in an acceptable format for the META.yml specification, i.e. any in the character class [-_a-z]. For user defined keys, although not explicitly stated in the specifications (v1.0 - v1.4), the convention is to precede the key with a pattern matching qr{Ax_}i. Following this any character from the character class [-_a-zA-Z] can be used. This clarification has been added to v2.0 of the specification. o identifier($self,$key,$value) Validates that key is in an acceptable format for the META.yml specification, for an identifier, i.e. any that matches the regular expression qr/[a-z][a-z_]/i. o module($self,$key,$value) Validates that a given key is in an acceptable module name format, e.g. 'Test::CPAN::Meta::YAML::Version'. BUGS, PATCHES &; FIXES There are no known bugs at the time of this release. However, if you spot a bug or are experiencing difficulties that are not explained within the POD documentation, please send an email to barbie@cpan.org or submit a bug to the RT system (http://rt.cpan.org/Public/Dist/Display.html?Name=Test-CPAN-Meta-YAML). However, it would help greatly if you are able to pinpoint problems or even supply a patch. Fixes are dependent upon their severity and my availability. Should a fix not be forthcoming, please feel free to (politely) remind me. AUTHOR
Barbie, <barbie@cpan.org> for Miss Barbell Productions, <http://www.missbarbell.co.uk> COPYRIGHT AND LICENSE
Copyright (C) 2007-2012 Barbie for Miss Barbell Productions This module is free software; you can redistribute it and/or modify it under the Artistic Licence v2. perl v5.14.2 2012-04-19 Test::CPAN::Meta::YAML::Version(3pm)
All times are GMT -4. The time now is 03:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy