The UNIX and Linux Forums  


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




Thread: replace
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 04-07-2008
charandevu charandevu is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 29
hi

Quote:
Originally Posted by DeCoTwc View Post
I'm not certain I'm following what you're saying, but if I do...


Code:
cat in|tr "|" "," > out

should give you what you want. I don't think I understand why your SED statement isn't working, but tr will replace the |'s with ,'s
i am getting the date in the excel sheet.

If i have a file like
E001|0|23/01/2007|CHARAN,DEVUPALLI|4000|INDIA| !INPUT

E001,0,23/01/2007,CHARAN,DEVUPALLI,4000,INDIA| !OUTPUT

I CAN CONVERT THE FILE BY USING SED......AND I AM GETTING THE OUT PUT.........
BUT I AM GETTING THE CHARAN IN ONE SEPARATE COLUMN AND THE DEVUPALLI IN SEPARATE COLUMN.

I NEED TO GET THE CHARAN,DEVUPALLI IN A SINGLE COULMN........HOW TO DO THAT........

PLS send how to do that