|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | 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 !! |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#8
|
|||
|
|||
|
Thank you so much. Scrutinizer, your solution is what I was attempting but I missed the 2 at the end, can someone please explain the trailing 2 on his solution?
|
| Sponsored Links | ||
|
|
|
#9
|
|||
|
|||
|
Hi,
Instead of using a "g" for global replacement, putting a number "n" there only replaces the n-th occurence of a pattern, in this case the second digit, since the number 2 was specified and the pattern is a digit. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Replace a random string of numbers | ryandegreat25 | Shell Programming and Scripting | 5 | 12-09-2009 01:02 AM |
| using sed to replace a specific string on a specific line number using variables | todd.cutting | Shell Programming and Scripting | 2 | 08-13-2009 09:40 PM |
| awk - replace number of string length from search and replace for a serialized array | otrotipo | Shell Programming and Scripting | 1 | 07-10-2009 12:04 PM |
| ksh: random number between 1-10 | dangral | Shell Programming and Scripting | 2 | 04-02-2009 02:52 PM |
| Replace a certain string with string containing random rubbish | MilanCZ | Shell Programming and Scripting | 2 | 03-11-2009 09:57 AM |