![]() |
|
|
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 |
| Search, replace string in file1 with string from (lookup table) file2? | gstuart | Shell Programming and Scripting | 9 | 06-08-2009 07:11 AM |
| Find the position of a string and replace with another string | bab123 | Shell Programming and Scripting | 6 | 01-21-2009 04:14 AM |
| search in finding position of a string in avariable | smr_rashmy | Shell Programming and Scripting | 2 | 02-08-2008 10:58 PM |
| Perl: Search for string on line then search and replace text | Crypto | Shell Programming and Scripting | 4 | 01-04-2008 10:24 AM |
| Print lines with search string at specific position | HealthyGuy | Shell Programming and Scripting | 4 | 12-04-2006 09:47 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Search for a string and replace the searched string in the same position
Hi All,
My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found..The issue is the last two digits in "0108" tells the year..The file may contain "0109","0110" and so on...i need to replace the correct year depending on the last two digits of the string..How do i go about??please help me.... eg 00000000 0 +00000000.00 2008/12/29 11:06:04 0108/12/29 10:05:37 00521363 i need to change this to 00000000 0 +00000000.00 2008/12/29 11:06:04 2008/12/29 10:05:37 00521363 Thanks in advance!!! |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|