Sponsored Content
Full Discussion: merge two file
Top Forums Shell Programming and Scripting merge two file Post 302506795 by zulabc on Tuesday 22nd of March 2011 02:24:00 AM
Old 03-22-2011
Quote:
Originally Posted by Chubler_XL
Code:
awk -F"[. ]" 'NR==FNR{f=$0;sub(".*/","",f);F[f]=$0;next} $1 in F{$0=F[$1]} !/NAME/' file_2 file_1

its worked..thanks, can u explain the code
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

merge two files in one file

All, I've basic knowlege on understanding UNIX Shell Programming. Right now I need to write a script for the following requirement. Kindly help me or suggest me how to write a Shell script. I've 8 .csv files that are containing "Detail" records. Each file getting more than 1 million. Another... (3 Replies)
Discussion started by: nvkuriseti
3 Replies

2. UNIX for Dummies Questions & Answers

file merge

Hi, I have 3 files. The containts of the files are as followes. File 1: 1 2 3 File 2: A B C File 3: Ind US Aus (6 Replies)
Discussion started by: siba.s.nayak
6 Replies

3. Shell Programming and Scripting

two file merge with awk

Help I read a file that has 2 fields. look for in a second file the first field and update it with the second field of first file. file1 1131518fat11416.txt ../newaod/2001/04/2001-04-00129233-1.txt file2 INSERT INTO tabric VALUES... (2 Replies)
Discussion started by: mcarlo65
2 Replies

4. Shell Programming and Scripting

[Bash]Attempting to Merge text from one file into another file at the line directly under a word

Hello, This is my first post on the forums. So I want to start by thanking anyone who is kind enough to read this post and offer advise. I hope to be an active contributor now that I've found these forums. I have an issue that I figure would be a good first post.. I have 2 text files... (5 Replies)
Discussion started by: efciem
5 Replies

5. Programming

Merge files from /etc to one file using C

Hi guys, I have a question which might be easy to answer but I don't how to do it. The thing is I need to make a program in C which creates a file with all the content from the files in \etc. I'm not new to C language but to UNIX. I've read somewhere I need to use functions like f_read... (2 Replies)
Discussion started by: sussil
2 Replies

6. Shell Programming and Scripting

Merge two files into one file

Hi, I need help with merging two files. My requirement is as below: File 1: MachineA MachineB File 2: Process1 Process2 Desired File: MachineA Process1 MachineB Process2 If file 2 contains only one entry Process1, then second line in the desired output should be: MachineA Process1... (1 Reply)
Discussion started by: chiru_h
1 Replies

7. UNIX Desktop Questions & Answers

Merge Last Word to Another File

Hi, Im a newbie to scripting. I have a file that looks like the one below. How can i change the last "/" to become a space. Thank You so Much for the help. :) hostname date Feb-9 /u100/DEVCO/Patching/a.log hostname date Jun-25 /u100/DEVCO/DumpCleaner/a.log hostname date Jun-25... (2 Replies)
Discussion started by: lienyca
2 Replies

8. UNIX for Dummies Questions & Answers

How to merge two files into third file?

Hi All, i have a requirement as below. There are two files. In 1st file a.txt i have four lines as below Ramesh Suresh Pradeep Franklin In 2nd file b.txt i have 5 lines as below Francis Elizabeth David John Ravi The output file suppose c.txt should contain 1st line of... (5 Replies)
Discussion started by: sureshk_85
5 Replies

9. UNIX for Beginners Questions & Answers

Match and Merge two file

Hi All, I have two file . I need to merge both file based on a match. File 1: Column1 column2 column3 column4 File 2: column3 column5 I need to combine the two file based on match , Which in my case is column3 and combine the file as below Combined file Column1 (10 Replies)
Discussion started by: arunkumar_mca
10 Replies

10. Shell Programming and Scripting

awk can't open file; file merge attempt

Dear all, I have an AWK related issue. I have two data files; the first, FileA has fewer lines, the second, FileB has more. FileA is a subset of FileB . Both files are tab delimited. What I want to do? When the first two columns for FileA match the first two columns of FileB, I want to... (4 Replies)
Discussion started by: A_Human_Person
4 Replies
TSINFO:(1)							   User Commands							TSINFO:(1)

NAME
tsinfo - report on the streams in a Transport Stream SYNOPSIS
tsinfo [switches] <infile> DESCRIPTION
TS tools version 1.11, tsinfo built Nov 11 2008 17:15:48 Report on the program streams in a Transport Stream. Files: <infile> is an H.222 Transport Stream file (but see -stdin) Switches: -stdin Input from standard input, instead of a file -verbose, -v Output extra information about packets -max <n>, -m <n> Number of TS packets to scan. Defaults to 1000. -repeat <n> Look for <n> PMT packets, and report on each TS tools version 1.11, tsinfo built Nov 11 2008 17:15:48 Report on the program streams in a Transport Stream. Files: <infile> is an H.222 Transport Stream file (but see -stdin) Switches: -stdin Input from standard input, instead of a file -verbose, -v Output extra information about packets -max <n>, -m <n> Number of TS packets to scan. Defaults to 1000. -repeat <n> Look for <n> PMT packets, and report on each SEE ALSO
The full documentation for tsinfo is maintained as a Texinfo manual. Please check http://tstools.berlios.de for more information. tsinfo 1.11 November 2008 TSINFO:(1)
All times are GMT -4. The time now is 10:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy