![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| replacing a character | Usha Shastri | UNIX for Dummies Questions & Answers | 8 | 03-24-2009 06:45 AM |
| replacing 1 character with many : tr | hkansal | UNIX for Dummies Questions & Answers | 16 | 11-09-2008 06:21 PM |
| replacing a character with another | Satyak | Shell Programming and Scripting | 1 | 10-23-2008 01:28 AM |
| Replacing the last character | ithirak17 | UNIX for Dummies Questions & Answers | 2 | 03-11-2008 10:24 AM |
| replacing string with special character ??? | imppayel | Shell Programming and Scripting | 4 | 12-08-2004 05:07 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Replacing a character in a line
Hi All
I want to replace a character in a line, but position will be different form one iteration to another. So i m keeping the position i a variable. I am trying with following code Code:
pos=3
echo "Hello World, Good Morning" | sed 's/\(.\{$pos\}\)./\1Y/'
Thanks Last edited by Yogesh Sawant; 04-02-2009 at 02:41 AM.. Reason: added code tags |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|