Sponsored Content
Top Forums Shell Programming and Scripting Add column info from one file to larger second file Post 302637193 by bartus11 on Tuesday 8th of May 2012 01:15:15 PM
Old 05-08-2012
Try:
Code:
join -j1 -o1.1,2.2,1.2 -a1 <(sort file1) <(sort file2)

 

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
al_findfirst(3alleg4)						  Allegro manual					     al_findfirst(3alleg4)

NAME
al_findfirst - Low-level function for searching files. Allegro game programming library. SYNOPSIS
#include <allegro.h> int al_findfirst(const char *pattern, struct al_ffblk *info, int attrib); DESCRIPTION
Low-level function for searching files. This function finds the first file which matches the given wildcard specification and file attributes (see above). The information about the file (if any) will be put in the al_ffblk structure which you have to provide. The al_ffblk structure looks like: struct al_ffblk { int attrib; - actual attributes of the file found time_t time; - modification time of file char name[512]; - name of file }; There is some other stuff in the structure as well, but it is there for internal use only. Example: struct al_ffblk info; if (al_findfirst("*.pcx", &info, FA_ALL) != 0) { /* Tell user there are no PCX files. */ return; } RETURN VALUE
The function returns non-zero if no match is found or if an error occurred and, in the latter case, sets `errno' accordingly. It returns zero if a match is found, allocating some memory for internal use in the structure. Therefore you have to close your search when you are finished to avoid memory leaks in your program. SEE ALSO
al_findnext(3alleg4), al_findclose(3alleg4), al_ffblk_get_size(3alleg4) Allegro version 4.4.2 al_findfirst(3alleg4)
All times are GMT -4. The time now is 07:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy