The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > HP-UX
Google UNIX.COM


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
set EDITOR=vi -> default editor not setting for cron tab aarora_98 Shell Programming and Scripting 6 09-12-2008 11:01 PM
Removing columns of a file using vi Editor DilipPanda UNIX for Dummies Questions & Answers 2 02-08-2008 01:27 AM
Trying to space columns in a report turbulence Shell Programming and Scripting 2 11-10-2004 01:55 PM
swap space / paging space aaronh AIX 2 05-19-2004 07:06 AM
pageing space vs swap space VeroL UNIX for Dummies Questions & Answers 1 01-22-2004 08:54 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-06-2005
Registered User
 

Join Date: Mar 2004
Posts: 10
How to add space in between columns in VI editor

Hi,
I am trying to add space after 3rd and 6th column for editing a file in special format. How should I achieve in VI?. So, is it possible to do in it in sed ?

thanks
vipa
Reply With Quote
Forum Sponsor
  #2  
Old 05-06-2005
reborg's Avatar
Administrator
 

Join Date: Mar 2005
Location: Ireland
Posts: 3,644
it can be done in either, but would be more easily acomplished with awk:
Code:
awk '$3=$3" ";$6=$6" " { print $0 }' file
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 04:47 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0