Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparing two versions of the same file

Status
Not open for further replies.

rajai123

Programmer
May 5, 2005
2
US
Hi,

Hi,

I'm trying to compare two versions of the same file. I'm trying to compare the current version with the version before it. I'm trying to retrieve the following information
1:) the fields that have been changed
2) the name of the user who had changed it and the date that it has been changed.

I'm trying to format the report and write it out to a file to look like this.

File Changed Task/Task Description Setup Changed Developer


I would really appreciate the help. This is my first unix script and would really appreciate it if you help me find some books and materials to read about scripting.

Thank you.
 
UNIX (like DOS) doesn't really have the concept of file versions. You have to specifically save a version to a different filename to achieve this.
1. The diff command (see man diff for usage) should help to show what fields have changed.
2. Unless this information (user & date changed) is held within the file, then the only information available is in the directory listing (try ls -l). But as this only gives the "owner" of the file and the date of last modification (or last access), it might not prove that useful.

There have many contributors in recent months who have suggested various books (and websites) on scripting in this and other forums. Try using the search facility here, with script book as a good starting point.

I hope that helps.

Mike
 
man sccs

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top