Jussi Hirvi wrote:
> On 9.6.2011 18.01, m.r...@5-cent.us wrote:
>> Why do vim scripting? That's what sed, or awk, or perl, are for. The
>> latter two, of course, are much easier to comprehend the logic, too.
>
> Maybe just because I know vim better than sed, awk or perl, which I
> haven't used at all. :-)
>
> The practical purpose is to turn a tabtext file into CSV
> (comma-separated) to be used in a SQL insert statement.

Oh. I'm not that good on sed, but awk would be:
awk '{gsub(/\t/, ",", $0);print $0;}' tabtextfile.

            mark

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Reply via email to