awk to parse current and next row in tab-delimited file
Hi there,
I would like to use awk to reformat a tab-delimited file containing three columns as follows:
Data file:
Desired output file:
I need the value in the third column +1 to be paired with the next value in the second column -1, and so on. The resultant output would be a single line containing the name of the first column followed by a space and then the parsed paired coordinates.
Thank you very much for your help!
Last edited by emiley; 07-26-2016 at 06:05 PM..
Reason: code not appearing correctly
Hey Everybody,
I am having much trouble figuring this out, as I am not really a programmer..:mad:
Datafile.txt
Column0 Column1 Column2
ABC DEF xxxGHI
I am running using WGET on a cronjob to grab a datafile, but I need to cut the first three characters from... (6 Replies)
Hi all, I need help to split a tab-delimited list into separate files by the filename-field. The list is already sorted ascendingly by filename, an example list would look like this;
filename001 word1 word2
filename001 word3 word4
filename002 word1 word2
filename002 word3 word4... (4 Replies)
Hello gurus,
I have a file in a tab delimited format and a header row. I need a code to delete the header in the file, and convert the file to a fixed width format, with all the columns aligned. Below is a sample of the file:... (4 Replies)
I have a file which was pipe delimited, I need to make it tab delimited. I tried with sed but no use
cat file | sed 's/|//t/g'
The above command substituted "/t" not tab in the place of pipe.
Sample file:
abc|123|2012-01-30|2012-04-28|xyz
have to convert to:
abc 123... (6 Replies)
I am fairly new to programming and trying to resolve this problem. I have the file like this.
CHROM POS REF ALT 10_sample.bam 11_sample.bam 12_sample.bam 13_sample.bam 14_sample.bam 15_sample.bam 16_sample.bam
tg93 77 T C T T T T T
tg93 79 ... (4 Replies)
Hi How to make tab delimited file to space delimited?
in put file:
ABC kgy
jkh ghj
ash kjl
o/p file:
ABC kgy
jkh ghj
ash kjl
Use code tags, thanks. (1 Reply)
Hi, I have a rquirement in unix as below .
I have a text file with me seperated by | symbol and i need to generate a excel file through unix commands/script so that each value will go to each column.
ex:
Input Text file:
1|A|apple
2|B|bottle
excel file to be generated as output as... (9 Replies)