Hello list! I need to insert a character in certain column in all rows of the file using vi. Please help
On Mon, Feb 25, 2008 at 09:52:21AM -0800, Szemer?dy G?bor wrote:> I need to insert a character in certain column in all rows of the file > using vi.Sounds more like a job for awk than vi. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |
On Mon, Feb 25, 2008 at 09:52:21AM -0800, Szemer?dy G?bor wrote:> I need to insert a character in certain column in all rows of the file > using vi. > Please helpI don't use vi but remember it can use regexp like sed does: the following examle inserts X after 5th column (read, in 6 column): sed -E 's/^(.{5})(.*)/\1X\2/' Eugene Grosbein