LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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


Reply
  Search this Thread
Old 02-13-2012, 06:10 AM   #1
pkanuru
LQ Newbie
 
Registered: Feb 2012
Posts: 1

Rep: Reputation: Disabled
How to find the difference in two shell script files..


Hi,

Please let us how to find the difference in two unix shell script files..
 
Old 02-13-2012, 06:16 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
use the diff command
 
1 members found this post helpful.
Old 02-13-2012, 01:23 PM   #3
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 1,840

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Or

If you want a 'side by side' view try sdiff. (Works best with wide screen/terminal and options of your choice. See the MAN page.)
 
Old 02-13-2012, 03:25 PM   #4
Geek255
Member
 
Registered: Feb 2012
Posts: 41

Rep: Reputation: Disabled
I use diff -u and patch to get the differences and apply changes to my scripts

ps: diff -y does the same as sdiff

Last edited by Geek255; 02-13-2012 at 03:34 PM.
 
Old 02-13-2012, 10:04 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 11,794
Blog Entries: 13

Rep: Reputation: 2947Reputation: 2947Reputation: 2947Reputation: 2947Reputation: 2947Reputation: 2947Reputation: 2947Reputation: 2947Reputation: 2947Reputation: 2947Reputation: 2947
The unofficial leader of my LUG swears by meld. He's not a big fan of GUI front-ends for command line programs, but for meld he makes an exception.
 
Old 02-14-2012, 03:02 AM   #6
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
You can use either diff or cmp command.
 
  


Reply


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
shell script to find the difference betwwn two file and place the difference to other kittunot4u Linux - General 3 07-19-2010 04:26 AM
difference between shell script & make subbusp2 Linux - Newbie 1 07-23-2008 09:33 PM
bash script to find the difference between the 4th element of each line in 2 files dontbugmeplz Programming 6 07-21-2008 08:05 AM
shell script help: operating on files returned by find Ryzol Programming 4 06-12-2008 09:38 PM
reqd to find the difference between two files Prasun1 Linux - General 7 09-09-2005 05:16 PM


All times are GMT -5. The time now is 04:50 AM.

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