Sponsored Content
Top Forums Shell Programming and Scripting Help with replace column one content based on reference file Post 302525606 by perl_beginner on Friday 27th of May 2011 07:52:34 AM
Old 05-27-2011
Help with replace column one content based on reference file

Input file
Code:
1 testing 10 20 1
A testing 20 40 1
3 testing 23 232 2
1 testing 10 243 2
.
.

Reference file
Code:
1 final
3 used
.
.

Output file
Code:
final testing 10 20
A testing 20 40
used testing 23 232
final testing 10 243
.
.

I would like to replace those content that shown in column 1 of input file with the content that shown in reference file (if available).
Thanks.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replace character based on reference file problem asking

I got two files right now, input file (target file), reference file 1 (query file) reference file 1 (long list of data) KOLOPWMOPOPO ADASDASD ADSASDASDAD . . target file (one long liner content) ADASDASDTYUKOKOLOPWMOPOPOOPLUAADSASDASDADPOPOUYADADASDASD desired output file content ... (1 Reply)
Discussion started by: patrick87
1 Replies

2. Shell Programming and Scripting

Help with rename header content based on reference file problem

I got long list of reference file >data_tmp_number_22 >data_tmp_number_12 >data_tmp_number_20 . . Input file: >sample_data_1 Math, 5, USA, tmp SDFEWRWERWERWRWER FSFDSFSDFSDGSDGSD >sample_data_2 Math, 15, UK, tmp FDSFSDFF >sample_data_3 Math, 50, USA, tmp ARQERREQR . . Desired... (7 Replies)
Discussion started by: perl_beginner
7 Replies

3. Shell Programming and Scripting

Help with merge two file based on similar column content

Input file 1: A1BG A1BG A1BG A1CF A1CF BCAS BCAS A2LD1 A2M A2M HAT . . Input file 2: A1BG All A1CF TEMP (5 Replies)
Discussion started by: perl_beginner
5 Replies

4. Shell Programming and Scripting

Help with replace column one content based on reference file

Input file 1 testing 10 20 1 A testing 20 40 1 3 testing 23 232 2 1 testing 10 243 2 . . Reference file 1 final 3 used . . Output file (1 Reply)
Discussion started by: perl_beginner
1 Replies

5. Shell Programming and Scripting

multiplication of two files based on the content of the first column

Hi, This is something that probably it is more difficult to explain than to do. I have two files e.g. FILE1 A15 8.3102E+00 3.2000E-04 A15 8.5688E+00 4.3000E-05 B13 5.1100E-01 1.9960E+00 B16 5.1100E-01 2.3000E-03 B16 8.6770E-01 1.0000E-07 B16 9.8693E-01 3.4000E-05... (4 Replies)
Discussion started by: f_o_555
4 Replies

6. Shell Programming and Scripting

Help with analysis data based on particular column content

Input file: Total_counts 1306726155 100% Number_of_count_true 855020282 Number_of_count_true_1 160014283 Number_of_count_true_2 44002825 Number_of_count_true_3 18098424 Number_of_count_true_4 24693745 Number_of_count_false 115421870 Number_of_count_true 51048447 Total_number_of_false ... (2 Replies)
Discussion started by: perl_beginner
2 Replies

7. Shell Programming and Scripting

Print the column content based on the header

i have a input of csv file as below but the sequence of column get changed. I,e it is not necessary that name comes first then age and rest all, it may vary. name,age,marks,roll,section kevin,25,80,456,A Satch,23,56,789,B Meena,24,78,H245,C So i want to print that column entires which... (12 Replies)
Discussion started by: millan
12 Replies

8. Shell Programming and Scripting

Replace a value using a reference data from other file

Gents, Can you please help me to solve this case In my input file I have a values in column 49 which always need to be one, but sometimes the system create a value 2, in this case I need to go to search in the original file and replace the values in the row where the value 2 is and in the... (6 Replies)
Discussion started by: jiam912
6 Replies

9. Shell Programming and Scripting

Replace a word based upon the file content

I have a file which contains timestamp and date in the second column. If the line contains one of the word then it need to be replace like below. Any help is appreciated. File: a smallint b timestamp c date d varchar O/P: a smallint ... (1 Reply)
Discussion started by: JoshvaPeter
1 Replies

10. UNIX for Beginners Questions & Answers

Replace a column in tab delimited file with column in other tab delimited file,based on match

Hello Everyone.. I want to replace the retail col from FileI with cstp1 col from FileP if the strpno matches in both files FileP.txt ... (2 Replies)
Discussion started by: YogeshG
2 Replies
GOBAN(1)						      General Commands Manual							  GOBAN(1)

NAME
goban - Goban screensaver SYNOPSIS
goban [options] DESCRIPTION
This manual page documents briefly the goban command. goban is a screensaver program that replays historical games of go (aka wei-chi and baduk) on the screen. OPTIONS
-version, --version Print version information -[no]stealth Stealth mode -display Display to use -[no]color Use color if possible -[no]hiContrast Use high-contrast graphics instead of rendered -adfile Set resource file name -name Name used to look up X resources -fontHeight Size (in pixels) of font (default = 12) -window-id X window id to draw in -root Draw on the root window -stonetime Milliseconds between stones in screensaver (default = 2000) -gametime Milliseconds between games in screensaver (default = 10000) -acceleration Rate of acceleration of stonetime 0=slow 100=fast (default = 50) -game-dir Directory to find games to play -minstonetime Minimum stonetime (limit on acceleration) in screensaver (default = 100) -arena.games Number of games to play in arena test -arena.prog1 Program 1 for arena testing -arena.prog2 Program 2 for arena testing -arena.size Size to use in arena testing -arena.komi Komi for arena testing -arena.handicap Handicap for arena testing -edit Edit SGF file -nngs Connect to NNGS -igs Connect to IGS -screensaver Run as a screensaver -help, --help Show help message SEE ALSO
xscreensaver(1) See the README for info about arena mode. AUTHOR
goban was written by Scott Draves <spot@draves.org>. This manual page was written by Al Nikolov <clown@debian.org>, for the Debian project (and may be used by others). The Debian package is dedicated to the Saint-Petersburg Go Federation and personally to Maxim Podolyak, it's President. November 4, 2010 GOBAN(1)
All times are GMT -4. The time now is 02:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy