Sponsored Content
Top Forums Shell Programming and Scripting Merge 2 columns/remove specific spaces Post 302494477 by danhodges99 on Monday 7th of February 2011 11:46:13 AM
Old 02-07-2011
When I run this, I'm getting the following out:
Code:
ENGPREM	1	ManUtd	25	12	1	0
ENGPREM	2	Arsenal	25	8	1	3
ENGPREM	3	ManCity	26	8	3	2
ENGPREM	4	Chelsea	25	8	2	2
ENGPREM	5	Tottenham	25	7	5	1
ENGPREM	6	Liverpool	26	8	3	2
ENGPREM	7	Sunderland	26	6	5	2
ENGPREM	8	Bolton	26	6	5	2
ENGPREM	9	Stoke	25	7	2	4
ENGPREM	10	Newcastle	25	4	5	4
ENGPREM	11	Blackburn	26	6	3	4
ENGPREM	12	Fulham	26	5	5	3
ENGPREM	13	Everton	25	4	5	3
ENGPREM	14	AstonVilla	26	5	5	3
ENGPREM	15	Blackpool	25	3	2	6
ENGPREM	16	Birmingham	24	3	7	2
ENGPREM	17	West Brom	25	5	3	4
ENGPREM	18	Wigan	26	3	6	5
ENGPREM	19	Wolverhampton	25	6	2	5
ENGPREM	20	West HamUnited	26	3	4	6

So almost there, but issues with lines 17 and 20...
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remove spaces from columns

I have a file with only one field something like this : 213.45 220.65 240.47 345.67 320.45 I want to remove all spaces in between. Is there any unix command for that ?Thanks in advance.. (2 Replies)
Discussion started by: jacks
2 Replies

2. Shell Programming and Scripting

merge columns into one line after a specific pattern

Hi all, im a linux newbie, plz help! I have a file - box -------- Fox-2 -------- UF29 zip42 -------- zf-CW SNF2_N Heli_Z -------- Fox -------- Kel_1 box (3 Replies)
Discussion started by: sam_2921
3 Replies

3. UNIX for Dummies Questions & Answers

How to remove columns with specific string?

If I have a data test.txt with 1000 columns such as: id sex gene1 gene2 gene2.dl gene3 gene4 gene4.dl ....... 1 1 AA AT AT TT AT AT ....... 2 1 AG TT TT TA AA AA ....... 3 2 AA AT AT TT AT ... (2 Replies)
Discussion started by: AMBER
2 Replies

4. Shell Programming and Scripting

remove white space from specific columns in text file

Hello i have a text file like this: 1 AB AC AD EE 2 WE TR YT WW 3 AS UY RF YT the file is bigger , but that's an example of the data what i want to do is to merge all columns together except the first one, it will become like this : 1 ABACADEE 2 WETRYTWW 3 ASUYRFYT (8 Replies)
Discussion started by: shelladdict
8 Replies

5. UNIX for Dummies Questions & Answers

How to count specific columns and merge with unique ones?

Hi. I am not sure the title gives an optimal description of what I want to do. I have several text files that contain data in many columns. All the files are organized the same way, but the data in the columns might differ. I want to count the number of times data occur in specific columns,... (0 Replies)
Discussion started by: JamesT
0 Replies

6. Shell Programming and Scripting

How to remove spaces between the columns in UNIX script?.

Hi guru's, I am trying to write a script to generate a csv file by connecting to database run a query and put the values into csv file. But the problem i face is i am getting lot of space after one value.how can i remove those values?. Please help. #!/bin/bash export... (2 Replies)
Discussion started by: karingulanagara
2 Replies

7. Shell Programming and Scripting

Remove first n characters from specific columns

I have a file like: s_20331 803 1 1 5 1:2=0.00000000 1:3=0.00000000 1:4=0.11111111 s_20331 814 1 1 5 1:2=0.00000000 1:3=0.12611607 1:4=0.00000000I would like to remove the four characters "x:x=" from all columns containing them (in my actual file, there are 15 total columns (i.e. columns... (1 Reply)
Discussion started by: pathunkathunk
1 Replies

8. Shell Programming and Scripting

Merge specific columns of two files

Hello, I have two tab delimited text files. Both files have the same number of rows but not necessarily the same number of columns. The column headers look like, File 1: f0order CVorder Name f0 RI_9 E99 E199 E299 E399 E499 E599 E699 E799 E899 E999 File 2:... (9 Replies)
Discussion started by: LMHmedchem
9 Replies

9. UNIX for Beginners Questions & Answers

To remove double quotes from specific columns

Hi, I've a requirement like, in a csv file of 30+ fields where all the columns are having double quotes I need to remove the double quotes from certain fields and certain field should remain as it is. Eg:... (6 Replies)
Discussion started by: Krishnanth S
6 Replies
IDENT(1)						      General Commands Manual							  IDENT(1)

NAME
ident - identify files SYNOPSIS
ident file ... DESCRIPTION
Ident searches the named files for all occurrences of the pattern $keyword:...$, where keyword is one of Author Date Header Locker Log Revision Source State These patterns are normally inserted automatically by the RCS command co (1), but can also be inserted manually. Ident works on text files as well as object files. For example, if the C program in file f.c contains char rcsid[] = "$Header: Header information $"; and f.c is compiled into f.o, then the command ident f.c f.o will print f.c: $Header: Header information $ f.o: $Header: Header information $ IDENTIFICATION
Author: Walter F. Tichy, Purdue University, West Lafayette, IN, 47907. Revision Number: 3.0 ; Release Date: 82/12/04 . Copyright (C) 1982 by Walter F. Tichy. SEE ALSO
ci (1), co (1), rcs (1), rcsdiff(1), rcsintro (1), rcsmerge (1), rlog (1), rcsfile (5). Walter F. Tichy, "Design, Implementation, and Evaluation of a Revision Control System," in Proceedings of the 6th International Conference on Software Engineering, IEEE, Tokyo, Sept. 1982. BUGS
Purdue University 6/29/83 IDENT(1)
All times are GMT -4. The time now is 04:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy