From: oraustin on
We've got Visual Studio - we are trying to keep the whole company nice
and microsofty - Thanks for kind offer William. I'd hope though that
between us we'll be able to gain the expertise we need. The reason I'm
shying away from things like gawk is that they might not be powerful
enough to do *everything* whereas Perl probably is and the whole point
of the exercise is to pull everything together into one place (and as
few technologies as possible). Also the idea of a full IDE /reg
expression builder / debugger and everything that would come if we buy
ActiveState VisualPerl is very appealing.

Maybe we look for libraries for VB - VB.net has regular expression
matching but I expect it's not the quickest route to text file
manipulation and alteration and we'd be better going the Perl route.
Have to admit it's all conjecture on my part though :o)

From: William Park on
oraustin(a)hotmail.com wrote:
> We've got Visual Studio - we are trying to keep the whole company nice
> and microsofty - Thanks for kind offer William. I'd hope though that
> between us we'll be able to gain the expertise we need. The reason
> I'm shying away from things like gawk is that they might not be
> powerful enough to do *everything* whereas Perl probably is and the
> whole point of the exercise is to pull everything together into one
> place (and as few technologies as possible). Also the idea of a full
> IDE /reg expression builder / debugger and everything that would come
> if we buy ActiveState VisualPerl is very appealing.
>
> Maybe we look for libraries for VB - VB.net has regular expression
> matching but I expect it's not the quickest route to text file
> manipulation and alteration and we'd be better going the Perl route.
> Have to admit it's all conjecture on my part though :o)

This is human question. Technical issues, I suspect, are irrelevant.
Perl programmers in your company will root for Perl. VB programmers
will advocate Visual Studio, because they can look busy.

Of course, I'm not unbiased here. :-) But, shell script is more
writable and readable than Awk/Perl/Python, and much more suitable for
the kind of data formatting that you're hinting at.

--
William Park <opengeometry(a)yahoo.ca>, Toronto, Canada
ThinFlash: Linux thin-client on USB key (flash) drive
http://home.eol.ca/~parkw/thinflash.html
BashDiff: Super Bash shell
http://freshmeat.net/projects/bashdiff/
From: John Savage on
oraustin(a)hotmail.com asks how to provide double-quotes around each
comma-delimited field in his example data:
>123,houlf,134
>"132","housdfgd,sdfd","14324"

$ cat data
ever,"what",summer
X
"1",ice skater,4,"hot,garlic",wordsmith
"a,four,word,list",2,upside down,"1"

$ sed -e 's/^/",/' -e ':a;s/",\([^",]\+\)/","\1"/;ta' -e 's/",//' data
"ever","what","summer"
"X"
"1","ice skater","4","hot,garlic","wordsmith"
"a,four,word,list","2","upside down","1"

This may not be the most succinct code but it does the job.
--
John Savage (my news address is not valid for email)