[TriLUG] Need some help parsing a file

John Vaughters jvaughters04 at yahoo.com
Mon Dec 30 09:48:39 EST 2013


Hahaha,

Thanks for the Humility Peter. I Imagine with a little extra work you were able to make it work. 

Concept is the same. Hence disclaimer.



On Monday, December 30, 2013 9:41 AM, Brian Blater <brb.lists at gmail.com> wrote:
 
Thank you. This works great and I actually think I understand the logic
(text I wanted started in column 40). This is nice and simple too without
the regex that always gets me stuck. I forgot about cut.

Brian


On Sun, Dec 29, 2013 at 9:13 PM, Dewey Hylton <plug at hyltown.com> wrote:

> > From: "Brian Blater" <brb.lists at gmail.com>
> > To: "TriLUG List" <trilug at trilug.org>
> > Sent: Sunday, December 29, 2013 9:04:16 PM
> > Subject: [TriLUG] Need some help parsing a file
> >
> > This has never been my forte and just can't seem to figure out what I
> > need
> > to do.
> >
> > I've got a file that basically has a directory listing. I need to
> > parse out
> > everything but the filenames. The format of the document is basically
> > like
> > this:
> >
> > 11/09/2013  11:49 AM         7,887,098 this is filename 1.txt
> > 11/05/2013  08:09 PM        11,652,690 this is filename 2.sh
> >
> > Basically I need to strip the date, time and bytes and just leave the
> > filename. Filenames will have spaces and various characters, but it
> > is
> > always after the bytes and spaces are what separate everything.
> >
> > This is on an UbuntuStudio 12.04 box.
> >
> > I figure I could do something with sed or awk or similar, but I just
> > don't
> > have a good understanding of them and my google searches did not
> > prove
> > helpful (probably not using the right terms in the search).
> >
> > Any help would be appreciated.
> >
> > Thanks,
> >
> > Brian
>
> try this:
>
> cut -c40- < filename.txt
> --
> This message was sent to: Brian Blater <brb.lists at gmail.com>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that
> address.
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web  :
> http://www.trilug.org/mailman/options/trilug/brb.lists%40gmail.com
> Welcome to TriLUG: http://trilug.org/welcome

>
-- 
This message was sent to: John Vaughters <jvaughters04 at yahoo.com>
To unsubscribe, send a blank message to trilug-leave at trilug.org from that address.
TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
Unsubscribe or edit options on the web    : http://www.trilug.org/mailman/options/trilug/jvaughters04%40yahoo.com
Welcome to TriLUG: http://trilug.org/welcome


More information about the TriLUG mailing list