The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 07-12-2005
ReV ReV is offline
Registered User
  
 

Join Date: Jun 2005
Posts: 34
Quote:
Originally Posted by vino
From what you are saying and given your output

num1f;;;;num5f


Code:
sed -e 's/[ ][ ]*/;/g'

I tried using
sed -e 's/ */;/g'
but it will take consecutive blank fields as one blank field. Can anyone help?


So, shouldnt it take the consecutive blank fields and convert it to ; ?

What's the output you are getting with your sed script ?

Vino
Hi,

num1f;;;;num5f
is my required output.
But when I use sed -e 's/ */;/g', my output is:
num1f;num5f

I hope I am clear with my description