![]() |
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 |
| SED Search Pattern and Replace with the Pattern | racbern | Shell Programming and Scripting | 4 | 03-15-2008 05:59 AM |
| awk: find and replace in certain field only, help needed | jkl_jkl | Shell Programming and Scripting | 5 | 02-21-2008 10:52 AM |
| Find a pattern and replace using sed. | maridhasan | Shell Programming and Scripting | 5 | 09-18-2007 01:43 AM |
| find and replace a pattern in a file | krishnamaraju | Shell Programming and Scripting | 1 | 08-29-2006 10:02 AM |
| find pattern in FILES and replace it ?? | tamer | UNIX for Dummies Questions & Answers | 4 | 03-03-2001 10:30 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
HI all
I have a problem, I need to replace a field in a file, but only in the lines that have some pattern, example: 100099C01101C00000000059394200701CREoperadora_TX 100099C01201C00000000000099786137OPERADORA_TX2 in the example above I need to change the first field from 1 to 2 only if the line has the CRE pattern. so the lines will be: 200099C01101C00000000059394200701CREoperadora_TX 100099C01201C00000000000099786137OPERADORA_TX2 Could you help me, how to do this with perl or with awk Regads Marcelo |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|