Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to convert text to columns in tab delimited text file Post 302457820 by kurumi on Tuesday 28th of September 2010 10:24:30 PM
Old 09-28-2010
Code:
$ ruby -ne 'a=$_.gsub(/\/|ML_GENO|->/," ").split; a.insert(2,%w{c3 c4 c5 c6});puts a.join(" ")' file
L36+univ06 22260 c3 c4 c5 c6 2 2 2 2 2 2 1 1 1 1 1 2 2 2 1 2 2 2 2 2 2 2 2 1
L36+univ06 23326 c3 c4 c5 c6 2 2 2 2 2 2 1 1 1 1 2 2 2 2 2 2 2 2 2 1 2 2 2 1

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Removing blanks in a text tab delimited file

Hi Experts I am very new to perl and need to make a script using perl. I would like to remove blanks in a text tab delimited file in in a specfic column range ( colum 21 to column 43) sample input and output shown below : Input: 117 102 650 652 654 656 117 93 95... (3 Replies)
Discussion started by: Faisal Riaz
3 Replies

2. Shell Programming and Scripting

Delete first column in tab-delimited text-file

I have a large text-file with tab-delimited genetic data that looks like: KSC112 KSC234 0 0 1 1 A G C T I simply wan to delete the first column, but since the file has 600 000 columns, it is not possible with awk (seems to be limited at 32k columns). Does anyone have an idea how to do this? (2 Replies)
Discussion started by: andmal
2 Replies

3. Shell Programming and Scripting

Extracting a portion of data from a very large tab delimited text file

Hi All I wanted to know how to effectively delete some columns in a large tab delimited file. I have a file that contains 5 columns and almost 100,000 rows 3456 f g t t 3456 g h 456 f h 4567 f g h z 345 f g 567 h j k lThis is a very large data file and tab delimited. I need... (2 Replies)
Discussion started by: Lucky Ali
2 Replies

4. UNIX for Dummies Questions & Answers

Deleting columns from a tab delimited text file?

I have a tab limited text file with 10000+ columns. I want to delete columns 6 through 23, how do I go about doing that? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies

5. UNIX for Dummies Questions & Answers

Add a new column to a tab delimited text file

I want to add a new column to a tab delimited text file. It will be the first column and it will just be 1's. How do I go about doing that? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies

6. UNIX for Dummies Questions & Answers

How to convert a text file into tab delimited format?

I have a text file that made using text editor in Ubuntu. However the text file is not being recognized as space or tab delimited, the formatting seems to be messed up. How can I convert the text file into tab delimited format? (3 Replies)
Discussion started by: evelibertine
3 Replies

7. UNIX for Dummies Questions & Answers

Using awk to log transform a column in a tab-delimited text file?

How do I use awk to log transform the fifth column of a tab-delimited text file? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies

8. Shell Programming and Scripting

Remove blank columns from a tab delimited text file

Hello, I have some tab delimited files that may contain blank columns. I would like to delete the blank columns if they exist. There is no clear pattern for when a blank occurs. I was thinking of using sed to replace instances of double tab with blank, sed 's/\t\t//g' All of the examples... (2 Replies)
Discussion started by: LMHmedchem
2 Replies

9. UNIX for Dummies Questions & Answers

Need to convert a pipe delimited text file to tab delimited

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)
Discussion started by: raja kakitapall
9 Replies

10. UNIX for Beginners Questions & Answers

Convert Excel File (xls) to tab delimited text file on AIX

Hi i have a problem in my job i try to convert an excel file (xls extention) to text file (tab delimited), but no result with this comand cat xxx.xls > xxx.txt Do you have eny idea? PS: sorry for my english Thanks!! (4 Replies)
Discussion started by: frisso
4 Replies
MLDONKEY_FILES(1)						  [FIXME: manual]						 MLDONKEY_FILES(1)

NAME
mldonkey_files - a files source filter for mlnet init file. SYNOPSIS
mldonkey_files {[--join] | [--split network_name] | [--test network_name]} [-f0 file] [-f1 file] [-f2 file] [-q] DESCRIPTION
This manual page documents briefly the mldonkey_files command. This manual page was written for the Debian GNU/Linux distribution because the original program is Debian GNU/Linux specific. This script was written by the debian developer to permit smoother transition to mldonkey without fasttrack support. MLDonkey suffer from a fasttrack file GPL-problematic. The support of fasttrack has been removed from the upstream source. -f0 file This option is needed. First part of the tri term split/join expression -f1 file This option is needed. Second part of the tri term split/join expression -f2 file This option is needed. Third part of the tri term split/join expression --join This command will merge -f1 and -f2 into file -f0. Be warned that no confirmation will be asked. -f0 will be erased. --split network_name This command will separate file source entry concerning the network network_name from the -f0 file and the rest. The entry concerning network_name will be put in -f1 file, the rest in -f2 file. Be warned that no confirmation will be asked. -f1 and -f2 files will be erased. --test network_name This command will search file source entry concerning the network network_name in the -f0 file. If one file comes from the given network, the exit code will be 0 else 1. -q Quiet mode. Actions --split, --test and --join are exclusive. You can only perform one at the same time. LICENSE
This manual page was originally written by Sylvain Le Gall gildor@debian.org for the Debian GNU/Linux system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Lesser General Public License, Version 2.1 or any later version published by the Free Software Foundation; considering as source code all the file that enable the production of this manpage. SEE ALSO
mlnet (1) /usr/share/doc/mldonkey-server/README.Debian AUTHORS
Sylvain Le Gall <gildor@debian.org> Author. Mehdi Dogguy <dogguy@pps.jussieu.fr> Author. COPYRIGHT
Copyright (C) 2003, 2004, 2005, 2006 Sylvain Le Gall Copyright (C) 2009 Mehdi Dogguy [FIXME: source] Mar 14, 2009 MLDONKEY_FILES(1)
All times are GMT -4. The time now is 09:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy