![]() |
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 |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Udev label removes corresponding fdisk, sfdisk or lsvdev entry | Radar | Filesystems, Disks and Memory | 2 | 03-06-2009 08:45 AM |
| Legal Ruling Removes Open-Source Cloud - CNNMoney.com | iBot | UNIX and Linux RSS News | 0 | 08-13-2007 08:30 PM |
| Legal Ruling Removes Open-Source Cloud - Investor's Business Daily (subscription) | iBot | UNIX and Linux RSS News | 0 | 08-13-2007 08:00 PM |
| Script removes itself | kayarsenal | Shell Programming and Scripting | 5 | 09-08-2006 11:24 AM |
| gawk HELP | sandeep_hi | Shell Programming and Scripting | 6 | 06-19-2006 08:56 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
GAWK removes FS | on output
I have the simple gawk script below. When the script runs in the output of all the ITM lines the FS is replaced with a space, the Non ITM lines retain the | field separator.
The ITM lines have many fields and I can't insert "|" between each field because some of the fields are blank. Is there a simple way of keeping the FS? Thanks, Paul # parse.awk -- script to substitute a field BEGIN { FS="|";rs=nl; } { if ($1=="ITM" && $5=="DIM" ) { $5 = $25 } } END { } ---------- Post updated at 01:23 PM ---------- Previous update was at 12:48 PM ---------- I needed to specify OFS="|" Last edited by paulr211; 10-08-2009 at 02:16 PM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|