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 3810
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: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |