TIMFOX123
asked on
Trying to parse CSV in bash!
I have data like this:
bart-d,Red level content search matched,Red,None,/etc/prof ile,"Solar is 10 - Set Path, umask, and trap in / etc / profile to: umask 022, trap 2 3, and P: / etc export PATH"
if I do a cut -f5 -d"," I get the middle of the last data.
Can simply make a tilde delmited file or somehow tell bash that I want to honor the " , " as a one string instead of two ?
thank you
I would prefer to do this in bash but I have bash & perl on the boxes !
bart-d,Red level content search matched,Red,None,/etc/prof
if I do a cut -f5 -d"," I get the middle of the last data.
Can simply make a tilde delmited file or somehow tell bash that I want to honor the " , " as a one string instead of two ?
thank you
I would prefer to do this in bash but I have bash & perl on the boxes !
ASKER
Excel does not do that very easy.
I was trying to figure out how to get bash to work with a real csv file
this, that,"the,other,thing",bea ns,rice
this should be 5 strings, not 7 ;)
I was trying to figure out how to get bash to work with a real csv file
this, that,"the,other,thing",bea
this should be 5 strings, not 7 ;)
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
cool
Open in new window