[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: VIM command to convert comma delimited text to latex table



On Wed, Feb 20, 2002 at 08:45:22AM -0800, Abner Gershon wrote:
> Can someone tell me search and replace commands I can
> use to convert comma delimited text in form:
> "field 1","field 2","field 3"
> to text file to be used in tabular latex file of form:
> field 1 & field 2 & field 3
> 

Will this do ?

cat oldfile | sed -e "s/,/ \& /g" > newfile

oops that didnt remove the quotes, well maybe :

cat oldfile | sed -e "s/,/ \& /g" | sed -e "s/\"//g" > newfile

or similar.

Al



Reply to: