Applying diff output to create new script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Applying diff output to create new script
# 1  
Old 04-14-2006
Applying diff output to create new script

I believe I read somewhere that you can do a diff of two ksh scripts and use the output to create a new script with the differences. Smilie

Could someone please show me the command(s) I'd need to use to get this accomplished? Or perhaps point me to a thread that explains this in detail.

Thanks in advance for your help.
# 2  
Old 04-14-2006
The typical steps of patch creation and application is

diff -Nau a.txt b.txt > a_b_delta.patch
Ship this patch to some other destination with a.txt
cd /destination/dir
patch -p0 < a_b_delta.patch


These are the steps I usually take. Of course variations are possible.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

awk and sed script to create one output CSV file

Hi All , I would require your help to generate one output file after post processing of one CSV file as stated below This file is just a small cut from a big file . Big file is having 20000 lines PATTERN,pat0,pat1,pat2,pat3,pat4,pat5,pat6,pat7,pat8,pat9... (2 Replies)
Discussion started by: kshitij
2 Replies

2. Shell Programming and Scripting

Need a script to create specialized output file

I need a script to process the (space-separate) values for each line as seen in the below input file and then output the data into an output file as follows. We have been unable to create this using typical bash scripting and cold not find anything out on the internet similar to what we are trying... (3 Replies)
Discussion started by: ddirc
3 Replies

3. Shell Programming and Scripting

Applying the same awk over a directory of files with individual file output

I am trying to apply an awk action over multiple files in a directory. It is a simple action, I want to print out the 1st 2 columns (i.e. $1 and $2) in each tab-separated document and output the result in a new file *.pp This is the awk that I have come up with so far, which is not giving me a... (6 Replies)
Discussion started by: owwow14
6 Replies

4. Shell Programming and Scripting

Help need in applying logic in one script

Hello Experts, (1 Reply)
Discussion started by: shams.abbazi@gm
1 Replies

5. Shell Programming and Scripting

Help with create multiple directories under diff file systems

Hi, Need help ...I want to create multiple directories in different /file systems using for loop..eg.../ORCL_data01/oradata/orcl/ctl. ../ORCL_data01/oradata/orcl/data. ../ORCL_data01/oradata/orcl/redo. Script :- ========= for dir in `ls -d... (8 Replies)
Discussion started by: Linux6.5
8 Replies

6. UNIX for Dummies Questions & Answers

Calling a remote shell script and applying a DB dump

Hi All, I have a requirement to call a remote shell script to apply a db dump. The remote shell script will reside in the /root/admin/bin directory and the database dump will be copied by the script from another area to /root/admin/var. the script will then invoke mysql to apply the db dump.... (1 Reply)
Discussion started by: daveu7
1 Replies

7. UNIX for Dummies Questions & Answers

Read a flat file, evaluate and create output. UNIX SCRIPT.

Hi all, I have a flat file as below; 470423495|1||TSA-A000073800||1|||1 471423495|1||TSA-A000073800||5|||5 472423495|1||TSA-A000073800||2|||7 473423495|1||TSA-A000073800||3|||3 I like to create a Unix script. The script have to valuate the last two columns, if the values are... (4 Replies)
Discussion started by: mrreds
4 Replies

8. Shell Programming and Scripting

how to create a logfile to track the below script output

Hi Dudes, Can you please suggest me how to create a logfile to track the below script output ? Thanks #!/bin/ksh # backup the "std" I/P file descriptor exec 5<&0 #echo "Proceed ?" while read config_line; do # backup the I/P file descriptor of "while" block exec 6<&0 # restore the... (2 Replies)
Discussion started by: shirdi
2 Replies

9. Shell Programming and Scripting

Process diff command output in a shell script

diff -yta file1 file2 #!/usr/abc/b/bin/perl5.6 | #!/usr/abc/b/bin/perl5.8 Notable thing about above line is "|" appears at 62nd position. When the same line is assigned in a variable in a ksh script, using ss=$(diff -yta file1 file2) it appears as ... (4 Replies)
Discussion started by: bhaliyajalpesh
4 Replies

10. Shell Programming and Scripting

diff 2 files; output diff's to 3rd file

Hello, I want to compare two files. All records in file 2 that are not in file 1 should be output to file 3. For example: file 1 123 1234 123456 file 2 123 2345 23456 file 3 should have 2345 23456 I have looked at diff, bdiff, cmp, comm, diff3 without any luck! (2 Replies)
Discussion started by: blt123
2 Replies
Login or Register to Ask a Question