The UNIX and Linux Forums  

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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how i prepare a c++ code(c code) for implementing my own protocol format amitpansuria High Level Programming 1 09-07-2007 12:09 AM
How to solve this akashag22 Shell Programming and Scripting 3 07-21-2007 06:54 AM
Can AWK solve it ??? emon Shell Programming and Scripting 1 02-23-2005 01:07 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-02-2008
satyam_sat satyam_sat is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 20
can you solve this code :

I have the below fixed file ..... and the sample code to convert csv ...last week it was working good ....to day i face error ....can you solve ...
Note : Iam passing ending positions as variables .... 4 ,5,15 etc....

source.txt :

E116015/29/19930E001E000
E122012/23/19940E001E003
E104012/04/19940E001E003


sed -e 's/./&,/4' 's/./&,/5' 's/./&,/15' 's/./&,/16' 's/./&,/20' 's/./&,/24' source.txt > delimited.csv

delimited.csv :

E116,0,15/29/1993,0,E001,E000
E122,0,12/23/1994,0,E001,E003
E104,0,12/04/1994,0,E001,E003
  #2 (permalink)  
Old 04-02-2008
KevinADC KevinADC is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2008
Posts: 731
Well, whats the error? Or is this some type of guessing game?
  #3 (permalink)  
Old 04-02-2008
satyam_sat satyam_sat is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 20
sorry

sorry ,

I got the following error :

sed: can't read s/./&,/5: No such file or directory
sed: can't read s/./&,/15: No such file or directory
sed: can't read s/./&,/16: No such file or directory
sed: can't read s/./&,/20: No such file or directory
sed: can't read s/./&,/24: No such file or directory
  #4 (permalink)  
Old 04-02-2008
Franklin52 Franklin52 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2007
Posts: 4,350
Double posting questions is against the:

Simple rules of the UNIX.COM forums:

Please continu here:

how to convert Fixed length file to delimited file.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:57 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0