Sponsored Content
Top Forums Shell Programming and Scripting Merge 2 columns/remove specific spaces Post 302494470 by danhodges99 on Monday 7th of February 2011 11:29:26 AM
Old 02-07-2011
Sorry, still inconsistent results with the whole dataset. I was trying to keep things simple with a small amount, but here's a much better dataset to work with:
Code:
ENGPREM    1    Man Utd    25    12    1    0
ENGPREM    2    Arsenal    25    8    1    3
ENGPREM    3    Man City    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    Aston Villa    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 Ham United    26    3    4    6


Last edited by radoulov; 02-07-2011 at 12:30 PM.. Reason: Code tags, please!
 

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
hdf_set_symlink(3)						  util/neo_hdf.h						hdf_set_symlink(3)

NAME
hdf_set_symlink - Set part of the tree to link to another SYNOPSIS
#include <util/neo_hdf.h> NEOERR *hdf_set_symlink (HDF *hdf, const char *src, const char *dest); ARGUMENTS
hdf -> the dataset node src -> the source node name dest -> the destination node name (from the top of the dataset, not relative names) DESCRIPTION
hdf_set_symlink creates a link between two sections of an HDF dataset. The link is "by name" hence the term "symlink". This means that the destination node does not need to exist. Any attempt to access the source node will cause the function to walk to the dest node, and then continue walking from there. Using symlinks can "hide" values in the dataset since you won't be able to access any children of the linked node directly, though dumps and other things which access the data structure directly will bypass the symlink. Use this feature sparingly as its likely to surprise you. RETURN VALUE
None SEE ALSO
hdf_set_symlink(3), hdf_get_valuef(3), compareFunc)(3), hdf_dump_str(3), hdf_get_int_value(3), hdf_read_string_ignore(3), hdf_copy(3), hdf_get_node(3), hdf_set_value(3), hdf_obj_child(3), hdf_read_string(3), hdf_set_buf(3), hdf_register_fileload(3), hdf_get_obj(3), hdf_get_attr(3), hdf_obj_top(3), hdf_dump_format(3), hdf_destroy(3), hdf_init(3), hdf_obj_value(3), hdf_write_string(3), hdf_set_val- uevf(3), hdf_sort_obj(3), hdf_write_file_atomic(3), hdf_obj_attr(3), hdf_set_valuef(3), hdf_get_copy(3), hdf_write_file(3), hdf_get_val- uevf(3), hdf_set_int_value(3), hdf_dump(3), hdf_get_value(3), hdf_set_copy(3), hdf_obj_next(3), hdf_search_path(3), hdf_obj_name(3), hdf_set_attr(3), hdf_get_child(3), hdf_remove_tree ClearSilver 12 July 2007 hdf_set_symlink(3)
All times are GMT -4. The time now is 08:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy