![]() |
|
|
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 |
| Changing one column of delimited file column to fixed width column | manneni prakash | Shell Programming and Scripting | 5 | 06-22-2009 06:27 AM |
| How to combined file? | jantzen16 | Shell Programming and Scripting | 7 | 12-25-2008 05:46 AM |
| How to combined to file with their values | jantzen16 | Shell Programming and Scripting | 5 | 12-22-2008 10:03 AM |
| printing in certain column based on some result | kumar_amit | Shell Programming and Scripting | 6 | 12-12-2008 03:51 PM |
| Help with script printing column with space | n3al10 | Shell Programming and Scripting | 4 | 12-16-2007 05:42 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Awk not printing the last combined column
Code:
nawk -F "|" 'FNR==NR {a[$1]=$2 OFS $3 OFS $4 OFS $5 OFS $6;next}\
{if ($5 in a)print $1,"test",$5,a[$5], $2,$3,$4 OFS OFS OFS OFS OFS OFS OFS OFS $2-$3-$4 ; \
else print $1,"Database",$5 OFS OFS OFS OFS OFS OFS $2,$3,$4 OFS OFS OFS OFS OFS OFS OFS OFS $2-$3-$4 }' OFS="|" \
file1 file2 > file3
Code:
$2-$3-$4 it is printing 0 Appreciate help |
|
||||
|
Quote:
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|