![]() |
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 |
| Replace text in parentheses | lalelle | Shell Programming and Scripting | 5 | 02-20-2008 10:52 PM |
| Find and replace text PLEASE HELP | bobo | UNIX for Dummies Questions & Answers | 6 | 01-12-2006 05:16 PM |
| Find and replace text | bobo | UNIX for Dummies Questions & Answers | 1 | 01-12-2006 01:17 PM |
| Replace Text | deep.singh | UNIX for Dummies Questions & Answers | 2 | 05-31-2005 12:03 PM |
| Replace Text with sed | networkfre@k | Shell Programming and Scripting | 5 | 11-24-2004 05:52 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Need to replace text in an awk
Hey guys:
Running Solaris 5.5.1 and trying to write an easy /bin/sh script. Here is what I am doing... grep "Total" /workspace_4/local/reports/cust_calls_5ess.050510 | awk '{print $4 "\t" $7 $8 $9 $10 $11 $12 $13 $14}' It renders the following results... 315268 CLARKSONUNIVERSITYis:1485 516286 BROOKHAVENHOSPITALis:8372 516231 CITIBANKis:1247 978796 DMATSAYERis:3447 718239 NYSBRONXCHILDRENPSY.CTRis:778 508875 DMATSFRAM2is:5759 781378 DMATSLEXTN2is:20826 914285 CITYOFWHITEPLAINSis:5154 What I would like to do is replace the "is:" above with a <TAB>, so that it looks more like this... 315268 CLARKSONUNIVERSITY 1485 516286 BROOKHAVENHOSPITAL 8372 516231 CITIBANK 1247 978796 DMATSAYER 3447 718239 NYSBRONXCHILDRENPSY.CTR 778 508875 DMATSFRAM2 5759 781378 DMATSLEXTN2 20826 914285 CITYOFWHITEPLAINS 5154 The tricky part is that I have to print $7 thru $14 everytime so that I make sure to capture all of the info. I can't simply leave off $13 or $14, for example, because I might miss data dependin on how long the line is. Any ideas??? -cd |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|