Need help recurrently cutting single column file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need help recurrently cutting single column file
# 1  
Old 02-09-2008
Need help recurrently cutting single column file

Hi there !
I have file with single column. I want to cut that column at fixed number of rows each time and paste in another file, in a way that in new file, the each cutting appear as separate columns.

I mean cutting file with one column of 10000 rows, with 100 rows each time, and in new file to get 100 columns each with 100 columns.

Help with suitable unix command for doing this is required.
Thanks in advance..

Last edited by jacks; 02-09-2008 at 11:42 AM.. Reason: correction
# 2  
Old 02-09-2008
try man split
# 3  
Old 02-09-2008
Quote:
Originally Posted by ghostdog74
try man split
I think that will split the column in a source file, but I do not know how to append that section each time in one file as new column.
I mean ..1 column of 100 rows will be appended each time in a destination file as new column.
# 4  
Old 02-09-2008
I am not too sure what you want here, but maybe the paste command is what you're looking for.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Paste 2 single column files to a single file

Hi, I have 2 csv/txt files with single columns. I am trying to merge them using paste, but its not working.. output3.csv: flowerbomb everlon-jewelry sofft steve-madden dolce-gabbana-watchoutput2.csv: http://www1.abc.com/cms/slp/2/Flowerbomb http://www1.abc.com/cms/slp/2/Everlon-Jewelry... (5 Replies)
Discussion started by: ajayakunuri
5 Replies

2. Shell Programming and Scripting

Cutting a column and pasting its number

Hello Gurus, This is my first ever post here. I tried looking for similar material but came up empty handed. Apologies if this is too verbose or if I'm not using the correct formatting. I have files containing a fixed number of elements per line; separator is a single space. Each line has the... (4 Replies)
Discussion started by: stdroid
4 Replies

3. UNIX for Dummies Questions & Answers

Cutting only the 1st column data

Hi All, I having a data file which consists of 20cr records in it. The 1st column is year field which consist of year in format 200809 and fields are seperated with ^. How do i trim it to 2008 in file and save it in a quick time as there are many records so that i can use the file for loading... (3 Replies)
Discussion started by: abhi_123
3 Replies

4. Shell Programming and Scripting

Adding content of two file in a single file column wise

Hi, I am trying to get the file in particular pattern using shell script. I have to add one column to some other file. For example consider two file as below. File1: name1 name2 name3 File2: Add1 age1 Add2 age2 Add3 age3 I want this two file in a single file format something like... (3 Replies)
Discussion started by: diehard
3 Replies

5. UNIX for Dummies Questions & Answers

Sorting a txt file that is a single column

How do you sort a text file that is made up of a single column? (sorting done in alphabetical order) Example input: MAP1S ISYNA1 STAT6 Example output: ISYNA1 MAP1S STAT6 Double post (0 Replies)
Discussion started by: evelibertine
0 Replies

6. UNIX for Dummies Questions & Answers

Sorting a txt file that is a single column

How do you sort a text file that is made up of a single column? (sorting done in alphabetical order) Example input: MAP1S ISYNA1 STAT6 Example output: ISYNA1 MAP1S STAT6 (1 Reply)
Discussion started by: evelibertine
1 Replies

7. UNIX for Dummies Questions & Answers

[Q] cutting from one column and pasting to another

I have a file laid out in columns with the first two lines line being: 219 432 4567 219 432 4587 I need to create a single line command to cut the characters in the 5th column and paste them back to the first column in the same file. (Hint:Two good solutions exist, one in which you use a... (9 Replies)
Discussion started by: mcampos7
9 Replies

8. UNIX for Advanced & Expert Users

need to get single column form csv file

hi 2 all i need to get single column from one csv file anyone help me ! >cat file.csv name,age x,1 y,2 z,3 Use code tags please, ty. in this "file.csv" file i need only name column can u help me !:b::b: (7 Replies)
Discussion started by: ponmuthu
7 Replies

9. Shell Programming and Scripting

Split a single file into several others basing on the last column

Hi folks, Happy new year. I have a file 'filename' that i wd like to split basing on the contents in the last column. The 'filename' content looks like 256772744788,9,11 256772744805,9,11 256772744792,9,11 256775543055,10,12 256782625357,9,12 256772368953,10,13 256772627735,10,13... (3 Replies)
Discussion started by: jerkesler
3 Replies

10. UNIX for Dummies Questions & Answers

Cutting the first 8 chars of a 2nd column

I am having a stupid moment :-) I have a tab-delimited file with 2 columns. I want to keep the first column as it is, but I only want the first 8 characters of the 2nd column. Example of input file data: --------------------------------- CATERPILLARS CW001651K.dwg... (9 Replies)
Discussion started by: cassj
9 Replies
Login or Register to Ask a Question