[CLUE-Tech] Simpler way of parsing data
Match Grun
match at dimensional.com
Mon Apr 16 09:31:57 MDT 2001
Being a programmer, I understand your friends point of view. My solution
is simpler:
1) If this is a one-off exercise, then cut & paste is fine.
2) If this is a repetitive chore that needs to be automated,
then write a custom program or script that performs the
desired process.
3) If this is a repetitive task that needs to be performed,
and you have chosen to cut & paste, that is also Ok.
However, if you need to give it to someone else to do,
then there is something else that can break. In this
case, follow step 2.
:-)
Match
On Sat, 14 Apr 2001 23:43:37 -0600
Kevin Cullis <kevincu at orci.com> wrote:
> Hey all,
>
> I've been having a discussion with a programmer friend of mine and it's
> funny how we both have different views of the same problem. I sometimes
> want to "cut and paste" data from the web browser into VIM in order to
> parse the data into useable form, such as records to be inported into a
> database. However, he has stated, along with other programmers I know,
> that I should save the file in HTML and then parse the HTML out of the
> file. However, while both achieve the same results, my programming
> friends way takes considerably more work and knowledge than my "cut and
> paste" method. In fact, all I have in my file is the data with a large
> number of spaces which require ONLY one command to use in order to
> remove the multiple spaces rather than his PERL or other method to
> parsing HTML tags.
>
> Why am I mentioning this? Because most new people to Linux can be
> bombarded with more technical approaches to a problem when sometimes a
> simple problem requires a simple solution.
>
> In VIM, I type:
>
> :%s/ *//g
>
> to remove all multiple spaces leaving only my data in fields. However,
> my friends approach can be used for more complex approaches to other
> problems which I can consider in future projects.
>
> Just a comment.
>
> Kevin
> _______________________________________________
> CLUE-Tech mailing list
> CLUE-Tech at clue.denver.co.us
> http://clue.denver.co.us/mailman/listinfo/clue-tech
More information about the clue-tech
mailing list