SCIENTIFIC-LINUX-USERS Archives

August 2015

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
ToddAndMargo <[log in to unmask]>
Reply To:
ToddAndMargo <[log in to unmask]>
Date:
Sun, 30 Aug 2015 20:38:03 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (38 lines)
> On 08/30/2015 06:22 PM, ToddAndMargo wrote:
>> Hi All,
>>
>> DuckDuckGo is failing me here.
>>
>> I need to do a
>>
>>     awk -F "two hex codes" '{print $1}'
>>
>> The two hex codes are C2 and A0
>>
>> What is the syntax to put them in the "-F"?
>>
>> Many thanks,
>> -T
>

On 08/30/2015 07:56 PM, Brad Cable wrote:
 > Try defining it in the FS variable in BEGIN{}, seems to work for me.
 >
 > $ echo -e "ASD\xC2\xA0QWE\xC2\xA0JKL" | awk 'BEGIN{FS="\xC2\xA0"} {print
 > $1}'
 > ASD
 >
 >
 > -Brad
 >
 >
 >

Thank you!

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ATOM RSS1 RSS2