Find the answer to your Linux question:
Results 1 to 2 of 2
I am completely new to this stuff and not quite sure what to search for on the Interwebs... I have 2 input files and I need to see if data ...
  1. #1
    Just Joined!
    Join Date
    Feb 2010
    Posts
    1

    Basic script

    I am completely new to this stuff and not quite sure what to search for on the Interwebs...

    I have 2 input files and I need to see if data in file1 is in file 2. I was searching on how to do a while loop but I can't seem to figure it out.

    An example would be file1 is a class roster and file2 would be a school roster. I need to parse the people from file1 that are in file2 into screen output or another file.

    Thanks

  2. #2
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    616
    file1
    Code:
    John
    Tim
    Jane
    Allen
    Rick
    file2
    Code:
    John
    Mandy
    Jane
    Frank
    comm -1 -2 file1 file2 > file3

    something like that?
    linux user # 503963

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...