can you solve this code :


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting can you solve this code :
# 1  
Old 04-02-2008
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  
Old 04-02-2008
Well, whats the error? Or is this some type of guessing game?
# 3  
Old 04-02-2008
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  
Old 04-02-2008
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

please help me to solve it

i thought about to use the commands : wc and sort cut and mybe more .. i need to write a bash script that recive a list of varuables kaka pele ronaldo beckham zidane messi rivaldo gerrard platini i need the program to print the longest word of the list. word in the output appears on a... (0 Replies)
Discussion started by: yairpg
0 Replies

2. Homework & Coursework Questions

any one help me to solve this code??

this is client server socket program. I have to use in C program code. What I have to do. 1. client connect to the server. 2. than client will first prompt a welcome message that asks the user to enter a username using the keyboard. This username will then be sent to the server. 3. than... (2 Replies)
Discussion started by: saiful_911
2 Replies

3. Programming

any one help me to solve this code??

this is client server socket program. I have to use in C program code. What I have to do. 1. client connect to the server. 2. than client will first prompt a welcome message that asks the user to enter a username using the keyboard. This username will then be sent to the server. 3. than... (1 Reply)
Discussion started by: saiful_911
1 Replies

4. UNIX for Dummies Questions & Answers

Can somebody solve this

I have to find the files older than 200 days from a path and copy them to some other directory with the current date stamp attached to it. i have written like follows: #!/bin/ksh DSTAMP=$(date +"%y%m%d%H%M") rm $CA_OUT_PATH/ftp_logs/temp touch $CA_OUT_PATH/ftp_logs/temp chmod 777... (13 Replies)
Discussion started by: sreenusola
13 Replies

5. UNIX for Advanced & Expert Users

Can somebody solve this

I have to find the files older than 200 days from a path and copy them to some other directory with the current date stamp attached to it. i have written like follows: #!/bin/ksh DSTAMP=$(date +"%y%m%d%H%M") rm $CA_OUT_PATH/ftp_logs/temp touch $CA_OUT_PATH/ftp_logs/temp chmod 777... (1 Reply)
Discussion started by: sreenusola
1 Replies

6. Shell Programming and Scripting

Can somebody solve this please

I have to find the files older than 200 days from a path and copy them to some other directory with the current date stamp attached to it. i have written like follows: #!/bin/ksh DSTAMP=$(date +"%y%m%d%H%M") rm $CA_OUT_PATH/ftp_logs/temp touch $CA_OUT_PATH/ftp_logs/temp chmod 777... (1 Reply)
Discussion started by: sreenusola
1 Replies

7. Programming

does any one know how to solve?

Hello experts, Here is my code.I can create the database.But I also want it to see standard output.Please see the blocked code.If i use them they show me weired symbols. #include <stdio.h> #include <stdlib.h> struct date { int month; int day; int year; }; struct empRec{... (14 Replies)
Discussion started by: mlhazan
14 Replies

8. Shell Programming and Scripting

How to solve this

I have to write an script for.. CUST: 123 trans: some contents CUST: 1234 trans: some contents Now wat i have to do is this: CUST:123 akash trans: some contents CUST:1234 akash1 trans: I have been able to add... (3 Replies)
Discussion started by: akashag22
3 Replies
Login or Register to Ask a Question