![]() |
|
|
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 |
| replace UTF-8 characters with tr | ripat | Shell Programming and Scripting | 2 | 06-26-2008 08:43 AM |
| Want to replace characters | arndorff | Shell Programming and Scripting | 5 | 01-29-2008 04:05 PM |
| How to replace characters 7 through 14 of every line in a file | jakSun8 | Shell Programming and Scripting | 9 | 12-13-2007 02:13 AM |
| Replace Characters... | lgardner17325 | UNIX for Dummies Questions & Answers | 8 | 10-26-2006 06:04 PM |
| how to replace control characters using sed? | hillxy | Shell Programming and Scripting | 5 | 10-16-2003 11:12 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Header Replace characters
Hi,
I have a flat file with header with tab delimiter. nbr id name salesid detail num source num jun_2007 jul_2007 aug_2007 sep_2007 ....feb_2008 I need to modify the header for the columns nbr to Id1 jun_2007 to Jun07 jul_2007 to Jul07 aug_2007 to Aug07 sep_2007 to Sep07 oct_2007 to Oct07 . . . . . feb_2008 to Feb08 Can any one please give me the command to run a shell script passing this flat file as parameter. I heard it wud be awk to read the first reocrd. File has 10K rows. Thanks in advance |
|
||||
|
Seems you have alonf list of replacement to be done.If that is the case, Prepare a file in the below format: s/search_str1/replace_str1/ s/search_str2/replace_str2/ ... and use Code:
sed -f pattern_file < input_file > output_file |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|