Tuesday, September 6, 2022

Print the first field of a table in one line separated by commas


I have the table:

1001 John Sena 40000
1002 Jafar Iqbal   60000
1003 Meher Nigar   30000
1004 Jonny Liver   70000

I'd like to print the first field, preceded by xx, and followed by yyy,
separated by commas, as in:

xx1001yyy, xx1002yyy, xx1003yyy, xx1004yyy

And I'd like to get this output after the table. I think I can do it with awk, but I'd like to do it with vim, if it is possible

-- 
Cesar

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/64256999-0bf6-41d5-bd94-9ef51bf4145cn%40googlegroups.com.

No comments:

Post a Comment