![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| replacing string in an XML file | subin_bala | Shell Programming and Scripting | 2 | 06-03-2008 07:14 AM |
| Replacing Last occurance of & from a string | vivekshady | Shell Programming and Scripting | 1 | 05-13-2008 08:15 PM |
| problem in replacing a string | ragavhere | Shell Programming and Scripting | 9 | 05-02-2008 09:02 AM |
| Replacing string in files | mohan705 | Shell Programming and Scripting | 2 | 08-29-2007 01:27 AM |
| string replacing | priya_9patil | Shell Programming and Scripting | 1 | 11-03-2006 12:05 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Problem replacing the string
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 changed is that possible the code that i wrote is wrong ? there is have any solution ? thank you |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|