![]() |
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 |
| Wierd thing about FSs and VGs | mhenryj | AIX | 4 | 11-13-2007 04:42 PM |
| Wierd networking issue | pflink | UNIX for Dummies Questions & Answers | 2 | 10-29-2007 06:19 AM |
| Wierd boot-up sequence | nitinp82 | UNIX for Dummies Questions & Answers | 1 | 02-01-2007 04:40 PM |
| wierd sparc 5 | dozy | SUN Solaris | 5 | 10-13-2003 10:45 AM |
| Wierd Message???? | lesstjm | UNIX for Dummies Questions & Answers | 6 | 01-04-2002 10:01 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Wierd results with awk
Hey, I'm trying to use awk for some simple file manipulations but i'm getting soem wierd results.
So i want to open up a file which looks like this: @relation 'autoMpg' @attribute a numeric @attribute b numeric @attribute c numeric @data -1.170815,0.257522,0.016416 -1.335653,0.30494,0.009793 -1.227306,0.300442,0.024001 and remove everything except the data, with tabs delimiting the values. I'm using the following awk script. gawk ' {OFS="\t"} data { print $1 $2 $3} /@data/ {data = 1} ' autoMpg-3d.arff > tmp.dat However, no matter what value I enter for OFS, I still always get output like this: -1.170815,0.257522,0.016416 -1.335653,0.30494,0.009793 -1.227306,0.300442,0.024001 with commas delimiting the values. Does anyone know whats going on here? |
|
||||
|
Thanks, that fixed it.
I had to use awk instead of awk though. wierd. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|