[NTLUG:Discuss] regexp/script

Daniel Hauck xdesign at hotmail.com
Tue Oct 23 12:16:00 CDT 2001


You know?  For lack of a simple shell-based solution popping into my mind,
I'd write a short and simple C program do to the work for me.  I guess
that's the way grew up in computers though... my first UNIX-like environment
operated within a 64k range... kernel and all...   If I wanted to do
anything useful, I had to write it because the shell was not capable of true
scripting of any kind and the UNIX ports of the utilities compiled too large
to be useful very often... Writing C isn't that hard anyway.  It's pretty
basic really.

Send me some sample files and I'll see if I can code you an example.  I hope
you're not in too big a hurry though.  It might take a few hours... busy day
today.

----- Original Message -----
From: "Wrenn, Bobby J." <Bobby.Wrenn at banctec.com>
To: <discuss at ntlug.org>
Sent: Tuesday, October 23, 2001 12:10 PM
Subject: [NTLUG:Discuss] regexp/script


> I have some files (209 total) with customer address information. I need to
> get the customer address into a comma delimited file with the file name
> (minus extension) as the first field.
>
> The file names have spaces in the name and a .txt extension
> Each file has the address embedded like this:
> ============================
>                Equipment Location
>                __________________
> Comments
>
> _________
>                Customer Name
>                123 Somestreet
>                Somecity                  ST  12345
>
> ===========================
>
> The output file needs to look like:
> ===========================
> name of file1,1st Customer Name,123 Somestreet,Somecity,ST,12345
> name of file2,2nd Customer Name,234 Nextstreet,Nextcity,ST,23456
> ===========================
>
> Is there an easy way to get the addresses out of the files? Because I am
> trying to learn this, an explanation of the process would be helpful. If
it
> is more complicated than I anticipate, please contact me off list with
your
> price for the answer. I can expense a small fee.
>
> TIA
> Bobby Wrenn
> Sr. Service Planner
> BancTec, Inc.
> 972.450.7832
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
>



More information about the Discuss mailing list