Sponsored Content
Top Forums Shell Programming and Scripting Add column info from one file to larger second file Post 302637137 by wallysb01 on Tuesday 8th of May 2012 11:34:19 AM
Old 05-08-2012
Add column info from one file to larger second file

Hi, long time reader, first time poster.

I've done some searching so please if this is a repeated post excuse the duplicate, but what I have are two files roughly like so:

File 1:
Code:
A     W
B     X
C     Y
D     Z

File 2:
Code:
A     1
C     2
D     3

And what I would like to get out is something like:
Code:
A     1     W
B           X
C     2     Y
D     3     Z

Does anyone have a suggestion?

Moderator's Comments:
Mod Comment Please use next time code tags for your code and data


Edited and will do in the future.

Last edited by wallysb01; 05-08-2012 at 01:09 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Splitting a Larger File Into Mutiple Smaller ones.

Hello.. Iam in need to urgent help with the below. Have data-file with 40,567 and need to split them into multiple files with smaller line-count. Iam aware of "split" command with -l option which allows you to specify the no of lines in smaller files ,with the target file-name pattern... (1 Reply)
Discussion started by: madhubt_1982
1 Replies

2. HP-UX

Ftp cannot put file larger than 64kb

Hi gurus, I have a problem with ftp access. The first 2 test e.g. Test A & Test B was successful with the file size 64kb (800++ numbers). The third test with file size 120kb was failed. The error is "Netout :Connection reset by peer". No password entered manually since the test run from the... (3 Replies)
Discussion started by: yeazas
3 Replies

3. UNIX for Dummies Questions & Answers

How to find a file whick is consuming larger disk space in file system

Hello, Can anybody please tell me the command to find out the filesystem or a file which is consuming larger disk space sing i want to find out the file and want to compress it please help me out any help would be appreciated (6 Replies)
Discussion started by: lokeshpashine
6 Replies

4. Shell Programming and Scripting

Generate a mail when you add info to a txt file

Hi, I have an application's log file: /var/log/logfile which is feeded from time to time due to an application. This file contains data, what I want is: -Whenever some new data is copied to /var/log/logfileI want to generate an email to root BUT only with the new added data in the body.... (6 Replies)
Discussion started by: iga3725
6 Replies

5. Shell Programming and Scripting

Script to loop line in a file and add info or do echo

I have a record.txt it will update weekly, and it could be 2 lines or more ... it just echo each line to the script san jose,23.34% tampa,2.15% dallas,30.20% seattle,44.29% Unknown,16.72% How do i write a shell script to give me a test.pl or bash file which contain #!/home/perl... (8 Replies)
Discussion started by: sabercats
8 Replies

6. Shell Programming and Scripting

Add new column from another file in existing file

I have two files which has one column comman in them. The two files has exact same number of rows in the same sequence. I want to add the second column of Users_detail_servicesonly.txt as last column in the existing file. 1) Users_detail_complete.txt V0135 Memb Info ... (4 Replies)
Discussion started by: Sanjeev Yadav
4 Replies

7. Shell Programming and Scripting

Creating a larger .xml file from a template(sample file)

Dear All, I have a template xml file like below. ....Some---Header....... <SignalPreference> ... <SignalName>STRING</SignalName> ... </SignalPreference> ......Some formatting text....... <SignalPreference> ......... ... (3 Replies)
Discussion started by: ks_reddy
3 Replies

8. Shell Programming and Scripting

Output Row if Third Column is Larger

Hi, I am fairly new to Unix scripting. We are running Solaris 5.10. I have the following question: Assume a text file with one text column, followed by 2 integer columns. How would I generate a script or, preferably, a command that will output the rows in which the value of the third... (6 Replies)
Discussion started by: QZ1
6 Replies

9. Shell Programming and Scripting

Add column to file A according to file B

Hi, i have a file A like this: JAT1 JAT2 JAT3 JAT4 JAT5 JAT6 ... and file B: JAT2 1.2 JAT4 2.3 JAT6 1.5 ... (2 Replies)
Discussion started by: the_simpsons
2 Replies

10. Shell Programming and Scripting

Help with add existing file name as new data column in new output file

Input File 1 cat S1.txt MI0043 2731 miR-1 Input File 2 cat S4.txt MI006 310 CiR-1 MI057 10 CiR-24 MI750 5 CiR-24 Desired Output File 1 cat S1.txt.out MI0043 2731 miR-1 S1.txt Desired Output File 2 cat S4.txt.out MI006 310 CiR-1 S4.txt (3 Replies)
Discussion started by: perl_beginner
3 Replies
INSTALLDEB-WORDLIST(1)													    INSTALLDEB-WORDLIST(1)

NAME
installdeb-wordlist - debhelper-like utility for maintainers of wordlist Debian packages SYNOPSIS
installdeb-wordlist [debhelper options] [options] DESCRIPTION
installdeb-wordlist is a debhelper like program that is responsible for installing appropriate debconf config and templates files and debhelper snippets in a wordlist package, according to the Debian Spell Dictionaries and Tools Policy. For more details, see /usr/share/doc/dictionaries-common-dev/dsdt-policy.txt.gz The actions executed by installdeb-wordlist are the following: o Maintainer Scripts installdeb-wordlist installs the necessary scraps of code in the postinst and postrm scripts. o Language info file installdeb-wordlist also checks a file containing wordlist information, called debian/info-wordlist or debian/package.info-wordlist. If this file is successfully parsed, it is installed in the /var/lib/dictionaries-common/wordlist directory. o Debconf files o templates and config files installdeb-wordlist installs the Policy compliant Debconf files from the information contained in the info-wordlist file. These files are created as debian/config (or debian/package.config) and debian/templates (or debian/package.templates). No intervention is needed here, since installdeb-wordlist will make a call to dh_installdebconf(1). If the package needs to have special code in the config file, the maintainer should supply files called debian/config.in (or debian/package.config.in). In the config.in file, the string "#DEBHELPER#" must appear alone in one line and start at the first column. installdeb-wordlist will replace that token with the necessary Policy compliant code (this works with config.in is either a Bourne shell or Perl script). If the package needs to define its own questions via the templates file the maintainer should either supply files debian/po-master.templates (or debian/package.po-master.templates) together with the appropriate po files if the package handles template localization through po-debconf, or debian/templates.in (or debian/package.templates.in) otherwise. See the po-debconf(7) manual page for more details and remember that the master templates name is now different. The templates defined in the templates.in or po-master.templates files are merged into the Policy compliant templates by installdeb-wordlist and a call to dh_installdebconf(1) is internally done. o The elanguages template field This field is useful if you want to override the debconf languages string with something different (since the master string remains the same, this will not trigger a new debconf call) or if you really think that the languages string should be internationalized for your package. Note that for most packages the poor man default localization should be enough, and translators should have another priorities. installdeb-wordlist default behavior is not adding an "elanguages" field to the templates file. If you want it added you have to call the script with the explicit --write-elanguages option. This field will be added with value taken from the "Elanguage" entry in the info file if present, or after the "Language" value otherwise. Note that this is useful only if: - You want to fix a buggy entry In this case just fill the "Elanguage" field in the info file with the new value. This will be shown at the debconf prompt. - You want to fully internationalize your entries In this case some black magic is needed at first time for smooth use, (a) Run installdeb-{ispell,wordlist} --no-installdebconf --write-elanguages for every package whose string should be internationalized. Edit the created .templates files and remove the leading underscores in the elanguages entry if present. (b) Run debconf-gettextize templates_to_be_internationalized. Check that all the desired .templates files are in debian/po/POTFILES.in and remove old .config and .templates files. (c) Run again installdeb-{ispell,wordlist} --no-installdebconf --write-elanguages and debconf-updatepo (no edit here) to remove references to non-translatable strings. Check that the desired strings are in the po master file (debian/po/templates.pot) and remove .config and .templates files. You are done. If the master "Elanguages" string is changed, repeat (c) afterward. OPTIONS
The usual dephelper(1) options are accepted. Options below are specific to installdeb-wordlist --no-installdebconf Do not run dh_installdebconf nor remove templates and config file. --no-pre-post Do not install {pre,post}{inst,rm} snippets. --write-elanguages Create the elanguages stuff. --debug Show some extra info. NOTES
This program is not part of debhelper, although it is intended to be used in wordlist packages using debhelper in its building. SEE ALSO
debhelper(1) This program is part of the dictionaries-common-dev package. It is intended to be used by maintainers of wordlist packages for Debian. See the documentation under /usr/share/doc/dictionaries-common-dev. AUTHORS
Rafael Laboissiere, Agustin Martin 1.12.11 2013-1-22 INSTALLDEB-WORDLIST(1)
All times are GMT -4. The time now is 04:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy