Visit The New, Modern Unix Linux Community

Is there any non graphical tool that make selective merge between text files?

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Is there any non graphical tool that make selective merge between text files?
# 1  
Is there any non graphical tool that make selective merge between text files?

whitout using awk / sad and so on?
# 2  
join will operate on lines in a set of files and create a resultset, made of lines from separate files. Is that what you mean?
# 3  
Originally Posted by umen
whitout using awk / sad and so on?
cat file1.txt | grep "selection" > new_file.txt
cat file2.txt | grep "other_selection" >> new_file.txt

Of course, you can use awk instead of grep and awk or sed to change the content of the files.
Or, if you don't want to make any change/selection, cat file1.txt file2.txt >> new_file.txt
# 4  

Two files will be displayed side by side with highlighting of the differences. And you can 'do' and 'dp' to copy the diffs to and from the buffers, so this is selective. The best way to do this I guess.

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #716
Difficulty: Medium
The theory of computable functions by Alan Turning greatly influenced the construction of modern digital computers.
True or False?

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Merge two text files (oh no, not again!)

Hello, I'm new to this forum. I have always made good use of all the wise hints shown here. But this time I'm struggling with an issue that is driving me crazy. I have two text files, I have to merge them based on the first column, resulting file must contain all record from the first file... (4 Replies)
Discussion started by: emare
4 Replies

2. UNIX for Dummies Questions & Answers

Merge selective columns from files based on common key

Hi, I am trying to selectively merge two files based on keys reported in the 1st column. File1: #file1-header1 file1-header2 111 qwe rtz uio 198 asd fgh jkl 165 yxc 789 poi uzt rew 89 lkj File2: #file2-header2 file2-header2 165 ghz nko2 ... (2 Replies)
Discussion started by: dovah
2 Replies

3. Red Hat

Recommendations on GRAPHICAL Monitoring Tool

Need assistance in finding a Graphical Monitoring tool open source for Centos , REDHAT linux which doesnt require "root" to compile the tool. Tool that does performance monitoring for Disk usage, CPU, Memory ,Network stats Need install and configure steps as well . (2 Replies)
Discussion started by: ajayram_arya
2 Replies

4. Shell Programming and Scripting

Merge the multiple text files into one file

Hi All, I am trying to merge all the text files into one file using below snippet cat /home/Temp/Test/Log/*.txt >> all.txt But it seems it is not working. I have multiple files like Output_ServerName1.txt, Output_ServreName2.txt I want to merge each file into one single file and... (6 Replies)
Discussion started by: sharsour
6 Replies

5. Ubuntu

Best graphical video converting tool for ubuntu

hi, is there any video converting tool that can convert all(almost) video formats. I want to convert from mp4/mkv to divx with file size limit.. (0 Replies)
Discussion started by: madhusudankh
0 Replies

6. Solaris

Recommend graphical monitoring tool for sun

Hi folks I am looking for tool which have graphical presentation for cpu and disk characteristics. Cpu is the least of the concern, disk is the most. We use san devices and i know which id's correspond to it. But the problem is that at least one of the tool I tried to use - Quest Sportlight does... (6 Replies)
Discussion started by: ggolub
6 Replies

7. Shell Programming and Scripting

how to merge selective content between files using awk?

Hello, I'm new to awk. I've 2 files where H stands for header and T for trailer. The number following T gives the record count in a file. file 1 looks like this: H|A|B|C 1|2|3 1|2|4 2|3|5 T|3 file 2 looks like this: H|A|B|C 4|5|6 7|8|9 T|2 Need to merge the above 2 files such... (2 Replies)
Discussion started by: skumre
2 Replies

8. Shell Programming and Scripting

Have several text files and want to merge into a single

Hello, I have several files that begin with db. in my directory and I would like to first take it from a specific word starting from $TTL until the end of the contents then do the same all the way down the directory then merge them into one txt file. Is this possible? I am using cygwin with... (4 Replies)
Discussion started by: richsark
4 Replies

9. AIX

merge text files

Hello. Could you please help to know the command to merge multiple text files into one? I am thinking to use: cat f1.txt f2.txt f3.txt > f4.txt Is it okay to use cat command for same purpose - Or could there be any disadvantage in using it? Thank you (4 Replies)
Discussion started by: panchpan
4 Replies

Featured Tech Videos