Sponsored Content
Full Discussion: tsv file comparison
Top Forums UNIX for Dummies Questions & Answers tsv file comparison Post 302300789 by Swapna173 on Wednesday 25th of March 2009 03:44:49 AM
Old 03-25-2009
tsv file comparison

Hi Guys,

I have to write a script to compare the tsv files headers with the values stored in the variable in bash.

I have declared variables as
HEADER_VERSION="All Versions\tVersion Type\tVersion\tLevel"

now file contains data as follows:
Code:
All Versions    Version Type    Version Level
All Versions    Revisions       Version 1       Version
All Versions    Revisions       Version 2       Version
All Versions    Revisions       Version 3       Version
All Versions    Revisions       Version 4       Version
All Versions    Revisions       Version 5       Version
All Versions    Revisions       Version 6       Version
All Versions    Revisions       Version 7       Version
All Versions    Revisions       Version 8       Version
All Versions    Revisions       Version 9       Version
All Versions    Revisions       Version 10      Version


the first line is the header of the file.

Now i wanted to compare first line of the file with the variable value. While comparing the value in the variable should be evaluated i.e \t and then compared. and in case the file containing a null column at the end it should ignore.


how can i solve the above problem.

Last edited by Yogesh Sawant; 03-25-2009 at 05:35 AM.. Reason: added code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File Comparison

I have to compare two text files, very few of the lines in these files will have some difference in some column. The files size is in GB. Sample lines are as below: 11111122222222333333aaaaaaaaaabbbbbbbbbccccccccdddddd 11111122222222333333aaaaaaaaaabbbbbbbbbccccccccddeddd So assuming these... (19 Replies)
Discussion started by: net_shree
19 Replies

2. UNIX for Dummies Questions & Answers

Converting csv to tsv and back

Anyone have a simple UNIX script to look at for doing this? I'm interested in how to convert from csv to tsv, and then back again, if I want to. Thanks! (13 Replies)
Discussion started by: doubleminus
13 Replies

3. Shell Programming and Scripting

4 column tsv file, output 1 specific column

Hello all siteexplorer.search.yahoo.com can output results in tsv format, when opened in excel I get 4 columns. I would like to wget that file, which I can do. I would then like to pull the 2nd column and output it only. I've searched around and found a few bits and pieces but nothing I've... (6 Replies)
Discussion started by: casphar
6 Replies

4. Shell Programming and Scripting

pattern grep using Perl in .TSV file

Hi All, I have a .TSV extension file having ~1 Gig data and I need to grep a pattern in that file using perl. I am not able to read the file using perl any suggestions on this/ If I Change the format my data gets mismangled so I am bothered about using specific format as well. #!... (3 Replies)
Discussion started by: vmsenthil
3 Replies

5. Shell Programming and Scripting

awk with tsv & csv

Hi! HELP! I have a few issues... I have a tsv with headers time, binary time, bytes, and bits. I'm trying to extract only time & bits. (Trying to graph throughput) Using: awk -F"\t" '{print $1, "\t"$4}' infile.tsv > outfile.tsv Output is only the headers: time bits Thinking it... (2 Replies)
Discussion started by: calitiggr
2 Replies

6. Shell Programming and Scripting

two file comparison

now i have a different file zoo.txt with content 123|zoo 234|natan 456|don and file rick.txt with contents 123|dog|pie|pep 123|tail|see|newt 456|som|sin|sim 234|pay|rat|cat i want to look for lines in file zoo.txt column1 that has same corresponding lines in column 1 of... (6 Replies)
Discussion started by: dealerso
6 Replies

7. Shell Programming and Scripting

Help with file comparison

Hello, I am trying to compare 2 files and get only the new lines as output. Note that new lines can be anywhere in the file and not necessarily at the bottom of the file. I have made the following progress so far. /home/aa>cat old.txt 0001 732 A 0002 732 C 0005 732 D... (7 Replies)
Discussion started by: cartrider
7 Replies

8. Shell Programming and Scripting

File Comparison: Print Lines not present in another file

Hi, I have fileA.txt like this. B01B02 D0011718 B01B03 D0012540 B01B04 D0006145 B01B05 D0004815 B01B06 D0012069 B01B07 D0004064 B01B08 D0011988 B01B09 D0012071 B01B10 D0005596 B01B11 D0011351 B01B12 D0004814 B01C01 D0011804 I want to compare this against another file (fileB.txt)... (3 Replies)
Discussion started by: genehunter
3 Replies

9. UNIX for Dummies Questions & Answers

Help with changing header of tsv with 30 million lines

Hi My 30 million line file has a header chr start end strand ref_context repeat_masked s1_smpl_context s1_c_count s1_ct_count s1_non_ct_count s1_m% s1_score s1_snp s1_indels s2_smpl_context s2_c_count s2_ct_count s2_non_ct_count s2_m% s2_score s2_snp s2_indels ... (2 Replies)
Discussion started by: plumb_r
2 Replies

10. Shell Programming and Scripting

Split each column in TSV file to be new line?

My TSV looks like: Hello my name is John \t Hello world \t Have a good day! \t See you later! Is there a simple bash script that splits the tsv on tab to: Hello my name is John Hello world Have a good day! See you later! I'm really stuck, would appreciate any help! (5 Replies)
Discussion started by: pxalpine
5 Replies
OPENSSL_VERSION_NUMBER(3)					      OpenSSL						 OPENSSL_VERSION_NUMBER(3)

NAME
OPENSSL_VERSION_NUMBER, SSLeay, SSLeay_version - get OpenSSL version number SYNOPSIS
#include <openssl/opensslv.h> #define OPENSSL_VERSION_NUMBER 0xnnnnnnnnnL #include <openssl/crypto.h> long SSLeay(void); const char *SSLeay_version(int t); DESCRIPTION
OPENSSL_VERSION_NUMBER is a numeric release version identifier: MMNNFFPPS: major minor fix patch status The status nibble has one of the values 0 for development, 1 to e for betas 1 to 14, and f for release. for example 0x000906000 == 0.9.6 dev 0x000906023 == 0.9.6b beta 3 0x00090605f == 0.9.6e release Versions prior to 0.9.3 have identifiers < 0x0930. Versions between 0.9.3 and 0.9.5 had a version identifier with this interpretation: MMNNFFRBB major minor fix final beta/patch for example 0x000904100 == 0.9.4 release 0x000905000 == 0.9.5 dev Version 0.9.5a had an interim interpretation that is like the current one, except the patch level got the highest bit set, to keep continuity. The number was therefore 0x0090581f. For backward compatibility, SSLEAY_VERSION_NUMBER is also defined. SSLeay() returns this number. The return value can be compared to the macro to make sure that the correct version of the library has been loaded, especially when using DLLs on Windows systems. SSLeay_version() returns different strings depending on t: SSLEAY_VERSION The text variant of the version number and the release date. For example, "OpenSSL 0.9.5a 1 Apr 2000". SSLEAY_CFLAGS The compiler flags set for the compilation process in the form "compiler: ..." if available or "compiler: information not available" otherwise. SSLEAY_BUILT_ON The date of the build process in the form "built on: ..." if available or "built on: date not available" otherwise. SSLEAY_PLATFORM The "Configure" target of the library build in the form "platform: ..." if available or "platform: information not available" otherwise. SSLEAY_DIR The "OPENSSLDIR" setting of the library build in the form "OPENSSLDIR: "..."" if available or "OPENSSLDIR: N/A" otherwise. For an unknown t, the text "not available" is returned. RETURN VALUE
The version number. SEE ALSO
crypto(3) HISTORY
SSLeay() and SSLEAY_VERSION_NUMBER are available in all versions of SSLeay and OpenSSL. OPENSSL_VERSION_NUMBER is available in all versions of OpenSSL. SSLEAY_DIR was added in OpenSSL 0.9.7. 50 2013-03-05 OPENSSL_VERSION_NUMBER(3)
All times are GMT -4. The time now is 09:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy