01-09-2009
HI,
It is not working.It has not replaced.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have three files that the string inside it I want to replace
so my code will be
#!/bin/bash
read -p "please input the old string:" string1
read -p "please input the new string:" string2
sed -i "s/string1/string2/g" *.c
but the problem is.. the string that I want to replace can't be... (2 Replies)
Discussion started by: Viken
2 Replies
2. Shell Programming and Scripting
Hi,
I have a file with the path of the directory present somewhere in it.I have assigned the path of the directory name to a variable. I want to replace it with another string.The code i used was
sed -e '/$variable/sbcd/' filename.
since the path name includes slashes '/', my sed command... (9 Replies)
Discussion started by: ragavhere
9 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
I have a script which uses sed to replace one string with another. The problem is, the string to be matched, and its replacement are coming in as two command line arguments $1 and $2
$1 and $2 can be absolutely anything, but both should be treated purely as strings. My sed command... (1 Reply)
Discussion started by: mark007
1 Replies
4. Shell Programming and Scripting
Hi all,
I have a script which uses sed to replace one string with another. The problem is, the string to be matched, and its replacement are coming in as two command line arguments $1 and $2
$1 and $2 can be absolutely anything, but both should be treated purely as strings. My sed command... (7 Replies)
Discussion started by: mark007
7 Replies
5. Shell Programming and Scripting
Hi there,
How can I run a script being sure that it runs all the way to the end even if the source file is deleted or replaced while running?
Actually, I have a script that runs daily on several servers. It replaces local files by updates from a master server. But I'd like it to replace itself... (3 Replies)
Discussion started by: chebarbudo
3 Replies
6. Solaris
Need to replace hard drive on Ultra 10 running Solaris 2.6.
Bought new drive about the same size.
Partitioned it differently to solve a space problem.
After newfs used tar commands to copy most of the files to the new drive.
Installboot took care of the boot file.
ufsdump copied /dev and... (3 Replies)
Discussion started by: snorkack59
3 Replies
7. Shell Programming and Scripting
Hi,
I have a line something like this
sys,systematic,system
I want to replace only the word system with HI
I used sed for this as below
echo sys,systematic,system | sed 's/system/HI/'
but I got output as
sys,HIatic,system
I wanted output as
sys,systematic,HI
Please tell me... (9 Replies)
Discussion started by: friendyboy
9 Replies
8. Shell Programming and Scripting
Hi all,
Sed is the one which always trobules me :(
here is my input :
*** it industry need to be evolved *** in the world and hope so *** to be dream
the output i am expecting is :
*** it industry need to be evolved
*** in the world and hope so
*** to be dream
... (4 Replies)
Discussion started by: panyam
4 Replies
9. Shell Programming and Scripting
Hi,
I have a file i which i want to replace {gIntegraHost} to {gTestRunHost} between <TCPSampler and curl only.
I am firing below command
sed '1,/<TCPSampler/!{ /curl/,/<TCPSampler/!s/{gIntegraHost}/{gTestRunHost}/; }' file1
But only on instance is getting replaced not all.
Any idea how... (6 Replies)
Discussion started by: abhitanshu
6 Replies
10. UNIX for Dummies Questions & Answers
my file is :
hello1
hello2
hello3_B,dummy,N
Need to change to :
hello1
hello2
hello3_B,dummy_01,N
Can anyone help? Thank you.
Please use code tags next time for your code and data. (6 Replies)
Discussion started by: Alyssa
6 Replies
LEARN ABOUT PHP
svn_cleanup
SVN_CLEANUP(3) 1 SVN_CLEANUP(3)
svn_cleanup - Recursively cleanup a working copy directory, finishing incomplete operations and removing locks
SYNOPSIS
bool svn_cleanup (string $workingdir)
DESCRIPTION
Recursively cleanup working copy directory $workingdir, finishing any incomplete operations and removing working copy locks. Use when a
working copy is in limbo and needs to be usable again.
PARAMETERS
o $workingdir
- String path to local working directory to cleanup
Note
Relative paths will be resolved as if the current working directory was the one that contains the PHP binary. To use the
calling script's working directory, use realpath(3) or dirname(__FILE__).
RETURN VALUES
Returns TRUE on success or FALSE on failure.
NOTES
Warning
This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in
a future release of PHP. This function should be used at your own risk.
EXAMPLES
Example #1
Basic example
This example demonstrates clean up of a working copy in a directory named help-me:
<?php
svn_cleanup(realpath('help-me'));
?>
The realpath(3) call is necessary due to SVN's quirky handling of relative paths.
SEE ALSO
update(3), SVN documentation on svn cleanup.
PHP Documentation Group SVN_CLEANUP(3)