The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
awk to compare lines of two files and print output on screen chlfc Shell Programming and Scripting 3 03-24-2008 01:16 AM
print selected lines tonet Shell Programming and Scripting 6 10-08-2007 02:50 AM
How to print specific lines with awk Bugenhagen Shell Programming and Scripting 10 08-16-2007 03:41 AM
How to print number of lines with awk ? maheshsri Shell Programming and Scripting 1 11-17-2005 11:19 PM
print adjacent lines apalex UNIX for Dummies Questions & Answers 1 04-29-2002 08:59 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 03-15-2006
Registered User
 

Join Date: Mar 2006
Posts: 18
print the first 5 lines in which 2 files differs

it is a simple problem, but I am totally new to shell programming
There are 2 files. I have to print the 5 five lines which are different.
I appreciate any help.
10x.
Reply With Quote
Forum Sponsor
  #2  
Old 03-15-2006
Registered User
 

Join Date: Sep 2005
Location: india
Posts: 78
use comm and head

comm -13 file1 file2 | head -5
comm -23 file1 file2 |head -5
Reply With Quote
  #3  
Old 03-16-2006
Registered User
 

Join Date: Mar 2006
Posts: 18
10x a lot, I've tried comm but didn't know what other command to use
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:03 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0