On Tue, 22 Mar 2011, Robert Citek wrote:
> Would this work?
Robert,
Yep.
It also works if I put the field separator spec in a BEGIN section. That's
what it needed.
Thanks,
Rich
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinu
Would this work?
echo "BC-2:2009-02-15:Flow:150.00:ft/sec:Temperature
(field):7.40:oF:Conductance,Specific:2058.00:umhos/cm:pH:7.40:Std
Units" |
awk -F: '{
print $1":"$2":"$3":"$4":"$5 ;
print $1":"$2":"$6":"$7":"$8 ;
print $1":"$2":"$9":"$10":"$11 ;
print $1":"$2":"$12":"$13":"$14 ;
}'
The same
On Tue, 22 Mar 2011, Fred James wrote:
> However ... since you are working with SQL to extract the data in the
> first place, you could just format the data as required and skip the AWK
> step altogether, could you not?
Fred,
Nope. I did not clearly explain. I have dozens of Excel spreadsheet
Rich Shepard wrote:
> On Tue, 22 Mar 2011, Fred James wrote:
>
>
>> Try 'printf' instead of print ...
>>
>> {printf
>> "%s:%s:%s:%s\n%s:%s:%s:%s:%s\n%s:%s:%s:%s:%s\n%s:%s:%s:%s:%s\n",$1,$2,$3,$4,$5,$1,$2,$6,$7,$8,$1,$2,$9,$10,$11,$1,$2,$12,$13,$14}
>>
>> ... if I haven't miscounted or something
Just to make user, your example is 3 lines ?
give an example of what you want the output to be for the first data
line in your example
the reason I ask is in your sample the data is colon sep'ed.
On Tue, Mar 22, 2011 at 1:32 PM, Rich Shepard wrote:
> I have a text file whose rows are formatte
On Tue, 22 Mar 2011, Randal L. Schwartz wrote:
> If your ISP supports v6 to your box, they'll be handing you a /48 pretty
> soon.
>
> If not, look into tunnelbroker.net, and get yourself your own /48 for
> free.
Thanks, Randal.
Rich
___
PLUG mailing
On Tue, 22 Mar 2011, Fred James wrote:
> Try 'printf' instead of print ...
>
> {printf
> "%s:%s:%s:%s\n%s:%s:%s:%s:%s\n%s:%s:%s:%s:%s\n%s:%s:%s:%s:%s\n",$1,$2,$3,$4,$5,$1,$2,$6,$7,$8,$1,$2,$9,$10,$11,$1,$2,$12,$13,$14}
>
> ... if I haven't miscounted or something, And yes, I treated all values a
Rich Shepard wrote:
>I have a text file whose rows are formatted like this:
>
> BC-2:2009-02-15:Flow:150.00:ft/sec:Temperature (field):7.40:oF:Conductance,
> Specific:2058.00:umhos/cm:pH:7.40:Std Units
> BC-2:2009-05-15:Flow::ft/sec:Temperature (field):10.10:oF:Conductance,
> Specific:1224.00:u
> "Rich" == Rich Shepard writes:
Rich>What, if anything, should I as the holder of a single outward
Rich> facing IPv4 address do to facilitate conversion to IPv6 usage?
If your ISP supports v6 to your box, they'll be handing you a /48 pretty
soon.
If not, look into tunnelbroker.net, and
I have a text file whose rows are formatted like this:
BC-2:2009-02-15:Flow:150.00:ft/sec:Temperature (field):7.40:oF:Conductance,
Specific:2058.00:umhos/cm:pH:7.40:Std Units
BC-2:2009-05-15:Flow::ft/sec:Temperature (field):10.10:oF:Conductance,
Specific:1224.00:umhos/cm:pH:8.14:Std Units
BC-3:
10 matches
Mail list logo