Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Match file and extract the output Post 303038895 by arunkumar_mca on Monday 16th of September 2019 03:10:26 PM
Old 09-16-2019
Match file and extract the output

Hi All

I have 2 file . I need match the files based on key and then form a third file which have the matching values

Code:
FILE1:
10264;K*AD
10265;K*AIR 
10266;K*AUTO
10267;K*BABY 
10268;K* FOOD

FILE2:
10264;1055.83
10265;716.94
10267;331.80
10268;23283.33

OUTPUT (Needed)
10264;K*AD;1055.83
10265;K*AIR;716.94
10266;K*AUTO;NA
10267;K*BABY;331.80
10268;K* FOOD;23283.33

Thanks in advance
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to extract output from a script to .xls file

Hi, I am running a script, the output of which is needed to be filled in .xls file. I am doing this manually now, i mean I am writing the output of the script to Excel file manually. How to redirect the output of the script to .xls file? Please help me out!!! Thanks much, Scriptlearner. (6 Replies)
Discussion started by: scriptlearner
6 Replies

2. Shell Programming and Scripting

Extract text in 2 columns of output file.

Hello!! I have the text file with following format... --SubTotal-----------------------------------0--161---------------44---13739369-67--- --SubTotal-----------------------------------0--147---------------0----49643---1----... (2 Replies)
Discussion started by: Danish Shakil
2 Replies

3. Shell Programming and Scripting

Extract variables from filenames and output to file

I need some help. I have a list of files (thousands) and would like to extract some variables from the file name and save that to a file The list of files look like: I am trying to write the following script but I am stuck at how I can get thevariables 'doy' and 'yr' from each file and then... (5 Replies)
Discussion started by: malandisa
5 Replies

4. Shell Programming and Scripting

extract DDL - output every match to separate file

Hi, i want to extract the 'CREATE INDEX' or 'CREATE UNIQUE INDEX' statements from a ddl file and output each match to a separate file. i was looking around the net but couldnīt find anything. a possible sed-script could be: sed -n '/CREATE*INDEX*/,/COMMIT/p' filename.ddlbut i couldnīt find out... (11 Replies)
Discussion started by: CactusMoon
11 Replies

5. Shell Programming and Scripting

Match list of strings in File A and compare with File B, C and write to a output file in CSV format

Hi Friends, I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving... File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
Discussion started by: asnandhakumar
6 Replies

6. UNIX for Dummies Questions & Answers

Grep -B used with -f? (Searching a file using a list of terms, output is lines before each match)

(1 Reply)
Discussion started by: Twinklefingers
1 Replies

7. Shell Programming and Scripting

Compare output of UNIX command and match data to text file

I am working on an outage script and I run a command from the command line which tells me the amount of generator failures in my market. The output of this command only gives me three digits to identify the site by. I have a master list of all sites in a separate file, call it list.txt. If my... (7 Replies)
Discussion started by: jbrass
7 Replies

8. Shell Programming and Scripting

Get output of multiple pattern match from first field to a file

Hi All, Greetings! I have a file of 40000+ lines with different entries, I need matching entries filterd out to their files based on first filed pattern for the matching : For example: All server1 entries (in field1) to come together with its path in 2nd field. The best output I want... (9 Replies)
Discussion started by: rveri
9 Replies

9. Shell Programming and Scripting

Bash to extract file prefix and from input to use in output

In the bash below which does execute I am trying to extract the contents of ${id} is 1234, as ${id} stores the variable that changes each time. After the path is removed the contents of ${id} are stored in pref, so they can be used in the output. Currently I am not able to extract the 1234 in the... (6 Replies)
Discussion started by: cmccabe
6 Replies

10. Shell Programming and Scripting

Extract numbers from output file and compare to value

Hi, I developed a script which finally originates a similar output: net0:up,Tx=475198bps,Rx=31009bps net1:up,Tx=39596bps,Rx=35678bps Of course the figures change and also the amount of interfaces (ex: could be more then net0 and net1). This is done automatically. The next step i'm... (4 Replies)
Discussion started by: nms
4 Replies
BABY(1) 						      General Commands Manual							   BABY(1)

NAME
baby -- create new process from two parents SYNOPSIS
baby -sex [m|f] [-name name] DESCRIPTION
baby is initiated when one parent process polls another server process through a socket connection in the BSD version or through pipes in the System V implementation. baby runs at low priority for approximately forty weeks and then terminates with a heavy system load. Most systems require constant monitoring when baby reaches its final stages of execution. Older implementations of baby did not require both initiating processes to be present at the time of completion. In those versions the initiating process which was not present was awakened and notified of the results upon completion. It has since been determined that the presence of both parent processes result in a generally lower system load at completion, and thus current versions of baby expect both par- ent processes to be active during the final stages. Successful completion of baby results in the creation and naming of a new process. Parent processes then broadcast messages to all other processes, local and remote, informing them of their new status. OPTIONS
-sex define the gender of the created process -name assign the name name to the new process EXAMPLES
baby -sex f -name Jacqueline completed successfully on July 9, 1992 at 9:11pm. Jacqueline's vital statistics: 8 pounds 3 oz, 20 inches, long dark hair. The parent process, Kim Dunbar, is reportedly doing fine. SEE ALSO
cigar(6), dump(5), cry(3). BUGS
Despite its complexity, baby only knows one signal, SIGCHLD, (or SIGCLD in the System V implementation), which it uses to contact the par- ent processes. One or both parent processes must then inspect the baby process to determine the cause of the signal. The sleep(1) command may not work as expected on either parent process for some time afterward, as each new instance of baby sends inter- mittent signals to the parent processes which must be handled by the parents immediately. A baby process will frequently dump core, requiring either or both parent processes to clean up after it. Despite the reams of available documentation on invoking and maintaining baby, most parent processes are overwhelmed. AUTHORS
From a man page by Joe Beck, <beck@cs.ualberta.ca>. BABY(1)
All times are GMT -4. The time now is 11:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy