May 29, 2002 #1 moepower Programmer Oct 5, 2000 93 US Is it possible to find the differences between two files and spool it to a new files? ie. File 1 has line a line b line c File 2 has line a line c line d I need the result file to have del line b add line d Is this doable? Thanks,
Is it possible to find the differences between two files and spool it to a new files? ie. File 1 has line a line b line c File 2 has line a line c line d I need the result file to have del line b add line d Is this doable? Thanks,
May 29, 2002 #2 tdatgod Programmer Jul 21, 2001 601 US Look at the man page for diff diff -e ( or is it diff -f ...look at the man page ) will build an ED script of commands to transform file 1 into file 2. is this what you are lookin for? Upvote 0 Downvote
Look at the man page for diff diff -e ( or is it diff -f ...look at the man page ) will build an ED script of commands to transform file 1 into file 2. is this what you are lookin for?
May 30, 2002 #3 bigoldbulldog Programmer Feb 26, 2002 286 US diff is the way to go. Here's a solution exactly as asked. diff "File 1" "File 2" | sed ' /[<>]/{ s/</del/ s/>/add/ b } d' Cheers, ND bigoldbulldog@hotmail.com Upvote 0 Downvote
diff is the way to go. Here's a solution exactly as asked. diff "File 1" "File 2" | sed ' /[<>]/{ s/</del/ s/>/add/ b } d' Cheers, ND bigoldbulldog@hotmail.com
May 30, 2002 Thread starter #4 moepower Programmer Oct 5, 2000 93 US Thanks a bunch . That's what I needed. Upvote 0 Downvote