Solved

How to do this?

Posted on 1998-06-24
1
227 Views
Last Modified: 2012-05-04
Under unix, I have text file contain records, each line is a record. I have both history
file and update file, if history file
contains:
a
b
c
update file contains
c
d
how can I merge together get a file
a
b
c
d
each letter stands for a line.
Thanks.
Shane
0
Comment
Question by:xiaoxiangz
1 Comment
 
LVL 3

Accepted Solution

by:
braveheart earned 20 total points
ID: 2008206
sort -u history update -o merged

You might have to restrict the sort to specific fields/columns in the history and update files. See "man sort" for details on how to do this.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question