Sponsored Content
Full Discussion: Interactive patching?
Top Forums UNIX for Dummies Questions & Answers Interactive patching? Post 45811 by cbkihong on Friday 2nd of January 2004 02:36:56 AM
Old 01-02-2004
Interactive patching?

I would like to ask if anyone knows of a Unix program that is like patch(1), but applies each diff interactively so I can decide on whether to apply a particular diff.

This is my situation: someone has made certain changes to a file I created, sent me the modified copy and I would like the program to prompt me interactively for each change so that I can decide on whether to apply each and every change to my original copy.

Any ideas is very much appreciated.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Patching Solaris

Hi quick and question for the unix expert here i downloaded the lastest patch from sun. i'm ready to patch my production server. should i just patch it as is or go in to init 1 or init S to do the patching. someone told me that you can just patch the server in init 3 and some other... (2 Replies)
Discussion started by: xNYx
2 Replies

2. Solaris

Can not boot after patching.

Last night I installed some patches by using update manager on my solaris 10 on AMD 64. Now I cannot boot. It is keep failing. I am able to go to failsafe and I am able ot update the boot archieve file but I am not sure what to do after this. I think it is not boot problem, I think my kernel is... (5 Replies)
Discussion started by: saif
5 Replies

3. Solaris

Patching

Hi all, I'm new to Solaris. How can i make sure that all my servers are patched to the same level. When i do a uname -a, i see different level. How can i make sure that they are having the same patches. Any expert to guide me through pls? eg. ServerA#uname -a SunOS ServerA 5.10... (0 Replies)
Discussion started by: ahlude
0 Replies

4. Solaris

Patching

Hi all Ive got 12 odd sun servers, running solars 8, 9 and soon 10. Have to admit I havent patched for years. Infact the last time I did patch a load of servers, sun provided you will a small script which would review the current patch levels, create a xml file that you would use on sunsolve... (3 Replies)
Discussion started by: sbk1972
3 Replies

5. Homework & Coursework Questions

Help with Interactive / Non Interactive Shell script

Q. Write a script that behaves both in interactive and non interactive mode. When no arguments are supplied it picks up each C program from the directory and prints first 10 lines. It then prompts for deletion of the file. If user supplies arguments with the script , then it works on those files... (1 Reply)
Discussion started by: rits
1 Replies

6. Homework & Coursework Questions

How to write script that behaves both in interactive and non interactive mode

Q. Write a script that behaves both in interactive and non interactive mode. When no arguments are supplied it picks up each C program from the directory and prints first 10 lines. It then prompts for deletion of the file. If user supplies arguments with the script , then it works on those files... (8 Replies)
Discussion started by: rits
8 Replies

7. Solaris

What is Kernel Patching?

Q.) What is KERNEL PATCHING? (0 Replies)
Discussion started by: aparna66
0 Replies

8. Solaris

Regarding Solaris patching..

Hi Gurus, I am new to solaris patching.. while doing the patching do we need to have the root previligies and also need help while doing patching work if the server has veritas on it........ Thanks in advance.......... (10 Replies)
Discussion started by: samanth009
10 Replies

9. Solaris

Mirror patching

HI Friends.... kindly explain os mirror patching?in SVM and Vxvm. :wall: (1 Reply)
Discussion started by: Rajesh_Apple
1 Replies

10. Solaris

ldom patching

Greetings everyone! I have the task of patching six ldoms and two control domains. I have never done this before and would like to know of any pitfalls or "gotchas" I may encounter. I have been looking online but have found very little about patching ldoms. Thank you all. (4 Replies)
Discussion started by: desertdenizen
4 Replies
XDIFF_STRING_PATCH(3)							 1						     XDIFF_STRING_PATCH(3)

xdiff_string_patch - Patch a string with an unified diff

SYNOPSIS
string xdiff_string_patch (string $str, string $patch, [int $flags], [string &$error]) DESCRIPTION
Patches a $str string with an unified patch in $patch parameter and returns the result. $patch has to be an unified diff created by xdiff_file_diff(3)/xdiff_string_diff(3) function. An optional $flags parameter specifies mode of operation. Any rejected parts of the patch will be stored inside $error variable if it is provided. PARAMETERS
o $str - The original string. o $patch - The unified patch string. It has to be created using xdiff_string_diff(3), xdiff_file_diff(3) functions or compatible tools. o $flags -$flags can be either XDIFF_PATCH_NORMAL (default mode, normal patch) or XDIFF_PATCH_REVERSE (reversed patch). Starting from ver- sion 1.5.0, you can also use binary OR to enable XDIFF_PATCH_IGNORESPACE flag. o $error - If provided then rejected parts are stored inside this variable. RETURN VALUES
Returns the patched string, or FALSE on error. EXAMPLES
Example #1 xdiff_string_patch(3) example The following code applies changes to some article. <?php $old_article = file_get_contents('./old_article.txt'); $diff = $_SERVER['patch']; /* Let's say that someone pasted a patch to html form */ $errors = ''; $new_article = xdiff_string_patch($old_article, $diff, XDIFF_PATCH_NORMAL, $errors); if (is_string($new_article)) { echo "New article: "; echo $new_article; } if (strlen($errors)) { echo "Rejects: "; echo $errors; } ?> SEE ALSO
xdiff_string_diff(3). PHP Documentation Group XDIFF_STRING_PATCH(3)
All times are GMT -4. The time now is 10:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy