- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: diff file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2009 07:51 PM
07-22-2009 07:51 PM
diff file
file A
======
$vi fileA
file1.txt
file2.txt
file3.txt
file4.txt
"
file B
======
$vi fileB
testfile1.txt
testfile2.txt
testfile3.txt
test5.txt
"
the file B has the files but all files begins with "test" , if I use diff to find the difference , it will pop all lines are different .
Can advise if I want to ignore such kind of difference , that mean if the line in file B is begins with the "test" , then treat this is not a difference , so that the result is as below , what can i do ? thx
my desired diff result
===============
< test4.txt
---
> test5.txt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2009 08:41 PM
07-22-2009 08:41 PM
Re: diff file
Well the diff command captures minute differnces also, even a space as well as a comma.
So I dont think so you will get your required output using diff comand.
Rgds
Yogesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2009 10:15 PM
07-22-2009 10:15 PM
Re: diff file
if diff not work for me , how can I find the difference in my case ? can you adivse ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2009 02:14 AM
07-23-2009 02:14 AM
Re: diff file
You'll have to convert file B so it is the same "format" as file A:
sed -e 's/^test//' fileB > fileB.new
diff fileA fileB.new
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2009 07:41 PM
07-23-2009 07:41 PM
Re: diff file
sdiff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2009 08:09 PM
07-23-2009 08:09 PM
Re: diff file
Any statement like this is almost certainly
false. I'm still waiting to be shown the
computer problem which admits only one
solution.
> [...] what can i do ?
I have no idea what you can do. Many people
would write some kind of computer program to
solve a problem like this, but that would
probably require a more precise description
of what might possibly be in the files.