![]() |
|
|
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 |
| Unable to display correctly the contents of a file without a line feed | Gato | Shell Programming and Scripting | 1 | 07-17-2008 05:23 PM |
| Deleting access_log.processed in crontab | chickenhouse | UNIX for Dummies Questions & Answers | 4 | 07-01-2008 11:19 PM |
| Is grep being used correctly? | sai0899 | Shell Programming and Scripting | 2 | 04-18-2008 01:03 AM |
| HP-UX will not boot correctly | intern | UNIX for Dummies Questions & Answers | 5 | 05-24-2006 09:19 AM |
| Couldn't set locale correctly | mattd | UNIX for Dummies Questions & Answers | 1 | 02-10-2004 05:11 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Awk: first line not processed correctly
Hey, I've made a little awk-script which reorders lines. Works okay, only problem is that is doesn't process the first line correctly. If I switch lines in the Input file it doesn't proces this first line either. Somebody please help! Here's is the code and the input file! thanx Code:
awk 'FS=","{print $1","$2","$3","$4","$5","$6","$7","$8","$9";xf="$11";yf="$
12";,"$10}' Input > Output
Code:
Input 1,2,0,0,6,43,5,0,p1=Gmünd;p2=Austria;p8=Bad Großpertholz;fc=4,,1473937,4855256,1 2,3,0,0,6,43,5,0,p1=Gmünd;p2=Austria;p8=Bad Großpertholz;fc=4,Güterweg Gugu,1473760,4855398,2 2,4,0,0,6,43,5,0,p1=Gmünd;p2=Austria;p8=Bad Großpertholz;fc=4,,1473760,4855398,2 Code:
Output 1,2,0,0,6,43,5,0,p1=Gmünd;p2=Austria;p8=Bad,Großpertholz;fc=4,,1473937,4855256,1,,,,,,,;xf=;yf=;, 2,3,0,0,6,43,5,0,p1=Gmünd;p2=Austria;p8=Bad Großpertholz;fc=4;xf=1473760;yf=4855398;,Güterweg Gugu 2,4,0,0,6,43,5,0,p1=Gmünd;p2=Austria;p8=Bad Großpertholz;fc=4;xf=1473760;yf=4855398;, |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|