![]() |
|
|
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 |
| help needed in fuser command | anju | Shell Programming and Scripting | 1 | 02-20-2008 02:08 AM |
| help needed in ls command | anju | Shell Programming and Scripting | 1 | 02-18-2008 07:20 AM |
| Help needed on Date command | nikunj | Shell Programming and Scripting | 5 | 07-08-2006 12:37 PM |
| Help needed for ps command in AIX | moe2266 | AIX | 0 | 09-30-2005 12:43 PM |
| help needed for sed command | manualvin | UNIX for Dummies Questions & Answers | 2 | 06-25-2004 12:41 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
SED command ---------help needed
Hi all
I am new babie to shell script, so please advise me n help me . suppose i have a string "abacus sabre", i need to replace occurences 'ab' with 'cd' and i need to store this result into same string and i need to return this result from script to the calling function, where as the string is passed from calling function. i tried like this mainStr="abacus" old_word="ab" new_word="cd" result=`sed -i s/$old_word/$new_word $mainstr ` return $result |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|