LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 11-16-2010, 07:34 PM   #1
cintlt
LQ Newbie
 
Registered: Nov 2010
Posts: 8

Rep: Reputation: 0
compare two file (please help me it's deadly urgent)


I have many files with info about soft, installed on remote machines.
I need to compare this file with template (soft than must be installed) and output file must content info about software that's not installed.
Code:
template.txt
software_name1
software_name2
software_name3.1
Code:
workstation1_info.txt
software_name3.2
Lantronix
..any other software
software_name1
output must be software_name2, becouse it is not installed, but software_name3.2 is good enough becouse version is more than we need.
So, the task is to show lines that is in template and not in source, using simple regular expressions

I use grep
Code:
grep -vxf template source >out
or
Code:
grep -Fvf template source >out
But it shows me only lines that is in source and not in template etc...

I need so fast to solve this problem, becouse it is deadly urgent case.
Please help me.
 
Old 11-16-2010, 07:46 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
http://www.linuxquestions.org/questi...urgent-844715/
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Five deadly sins of Android development LXer Syndicated Linux News 0 07-21-2010 02:20 PM
How to compare two columns in a file. shilpa.godhe Linux - Newbie 2 03-29-2010 03:42 AM
Mitigate the 7 Deadly Sins Found in Windows 7 DragonSlayer48DX Linux - News 3 10-27-2009 08:32 PM
I am suffering deadly a7mlinux Linux - General 3 07-13-2009 07:47 AM
file compare program Nyc0n Linux - General 4 08-18-2001 10:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration