[TriLUG] Need some help parsing a file

Peter Neilson neilson at windstream.net
Tue Dec 31 09:28:42 EST 2013


On Tue, 31 Dec 2013 09:10:46 -0500, John Vaughters  
<jvaughters04 at yahoo.com> wrote:

> Tom,
>
>> 11/09/2013 11:49 AM    7,887,098 this is filename 1.txt
>> 11/10/2013  12:50 PM          886,666 this be 2.txt
>> 11/11/2013  04:23 AM        666 tab me file.txt
>
>
> This still works on all your examples.
>
> echo '11/11/2013  04:23 AM        666 tab me file.txt' | cut -d ':' -f 2  
> | awk -F " [,0-9]+ " '{print $2}'
>
>
> John Vaughters

Almost. Tom's ORIGINAL third line contains two tabs (\t or 011) in the  
third line. Tabs got converted to spaces somewhere in the e-mail  
processing. Doesn't work on that line if tabs are in place.


More information about the TriLUG mailing list