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:
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
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)
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)
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)
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)
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)
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)
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)
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)
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)