LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-03-2008, 07:15 PM   #1
just.srad
Member
 
Registered: Apr 2008
Location: Singapore
Distribution: Slackware 14.0
Posts: 153

Rep: Reputation: 15
Question on diff's output


Hi,

Anyone here could help to explain what do the code
"0a1" and "2d2" mean? I tried to search in the web for the explanation but
couldn't find any. Thanks.

Code:
 diff --normal file1 file2
0a1
> hoho
2d2
< hee
4,7c4
<  
<  
<  
<  
---
> yo
Justin
 
Old 04-03-2008, 07:38 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Start here: http://lowfatlinux.com/linux-compare-files-diff.html
 
Old 04-03-2008, 09:09 PM   #3
JWPurple
Member
 
Registered: Feb 2008
Posts: 67

Rep: Reputation: 17
To make file2 from file1,

at line 0 of file1, insert a line, which becomes line 1 in file2

at line 2 of file1, delete the line, but a line 2 still exists in file2 (not entirely sure of this one)

from lines 4 through 7 of file1, change by removing 4 lines from file1, and replacing them with 1 line, which becomes line 4 of file2
 
Old 04-03-2008, 10:31 PM   #4
just.srad
Member
 
Registered: Apr 2008
Location: Singapore
Distribution: Slackware 14.0
Posts: 153

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by chrism01 View Post
Thanks man, that's a great one. It's more of a information , i think i can ignore it , just take note of the ">" and "<" signs will do.
 
Old 04-03-2008, 10:33 PM   #5
just.srad
Member
 
Registered: Apr 2008
Location: Singapore
Distribution: Slackware 14.0
Posts: 153

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by JWPurple View Post
To make file2 from file1,

at line 0 of file1, insert a line, which becomes line 1 in file2

at line 2 of file1, delete the line, but a line 2 still exists in file2 (not entirely sure of this one)

from lines 4 through 7 of file1, change by removing 4 lines from file1, and replacing them with 1 line, which becomes line 4 of file2
Thanks for your feedback too. I'll check my two files when i get back home.. because they are resided in my home pc..
 
  


Reply



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
tcpdump output question lumix Linux - Networking 1 10-23-2007 09:29 AM
C++ Output question vibrokatana Programming 9 10-15-2007 05:27 PM
Grep output question Kvetch Programming 5 07-20-2007 02:59 AM
iwconfig output question scowles Linux - Wireless Networking 2 12-03-2004 05:11 PM
C Output Question drigz Programming 13 09-10-2004 07:32 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:38 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
Open Source Consulting | Domain Registration