I need to find the difference of two files and save it in third file and process it..
But the outpur of diff command is coming with the 'line number - difference' code.
Eg of my output
i22,26d21
< Use the bc program to convert from decimal to hexadecimal.
< To do so, use the obase command to set the base for output:
39c34,35
< See Section 5.6 for more examples of using bc.
But i want only the lines and not the 'i22,26d21 & < Symbol'..
Pls help..
TIA
4 3811
Hi,
if you just need the lines, means their content, you could get them with - diff .... | grep ^\< | sed s/^\<\ //
But this doesn't give you the information, which line is new nor which one's changed or deleted.
Regards,
Bernd
Hi,
if you just need the lines, means their content, you could get them with - diff .... | grep ^\< | sed s/^\<\ //
But this doesn't give you the information, which line is new nor which one's changed or deleted.
Regards,
Bernd
Sorry i dont understand.. Is the syntax like this?? - diff file1 file2 > outfile | grep ^\< | sed s/^\<\ //
pls help...
Hi,
for just getting the new/changed/deleted lines use - diff file1.txt file2.txt | grep ^\< | sed s/^\<\ //
If you need the differences in diff.txt, use - diff file1.txt file2.txt | tee diff.txt | grep ^\< | sed s/^\<\ //
Regards,
Bernd
Hi,
for just getting the new/changed/deleted lines use - diff file1.txt file2.txt | grep ^\< | sed s/^\<\ //
If you need the differences in diff.txt, use - diff file1.txt file2.txt | tee diff.txt | grep ^\< | sed s/^\<\ //
Regards,
Bernd
Thanks Bernd............................................. .......
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Guillaume Lahitette |
last post by:
Hello everyone,
I am looking for a lightweight Java Applet to diff and merge two text
files. The functionality would be a subset of what WinMerge
(http://winmerge.sourceforge.net) offers:
-...
|
by: Nick Allen |
last post by:
After using ndiff from difflib, the function restore
would return the sequence that generated the delta. Unfortunately,
restore does not do the same for unified_diff. I do not see any similar...
|
by: Mark Steinberger |
last post by:
Where can I get a perl implementation of the unix diff utility?
Mark
|
by: Lionel van den Berg |
last post by:
Hi all,
I'm wondering if there is a diff function like the unix command in C++?
In fact I would like to know if you can call the unix (I should say
*nix) command from within a c++ application?...
|
by: Anil |
last post by:
Hi,
I have a HTML webpage that is updated every week.
I mean the layout gets chaged every week(not a very drastic change).
Like, edit box is changed to drop down menu or a field is moved from...
|
by: TonyHa |
last post by:
Hello,
Does any one have using Python to write a Unix "diff" command for
Window?
Tony Ha.
|
by: Steve Manes |
last post by:
My company offers an ASP service for advertising companies using PG.
For contractual reasons, each client gets its own replicated database.
This presents a problem whenever a new feature/fix...
|
by: Igor Shevchenko |
last post by:
Hi!
Suppose I have "pg_dump -s" of two pg installs, one is "dev", another is
"production". Their schemas don't differ too much, and I want to get a "diff
-u"-like schema diff so I can quickly...
|
by: AirYT |
last post by:
Hello,
I'm looking for an implementation for diffing 2 (text) files and spitting
out the output using php only. i would like to extend this to use ftp to
diff two files on two ftp servers, or...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |