Search Results

Search: Posts Made By: karthik_ak
10,117
Posted By karthik_ak
Any help?
Any help?
10,117
Posted By karthik_ak
@Scrutinizer i'm using windows 7 enterprise! ...
@Scrutinizer i'm using windows 7 enterprise!

@Everyone- thanks all for your time. All the codes that you gave worked perfectly on a different system running on unix.

Below code worked both on...
10,117
Posted By karthik_ak
This is the result of the the modified code ...
This is the result of the the modified code


abcd,789756,20140211,20140202,464532.00,C,XZY,,,Settlement of purchase.,,1
abcd,795156,20140211,20140202,548962.52,C,JPY,,,Payement to: tokyo...
10,117
Posted By karthik_ak
I ran the od -c filename to check for carriage...
I ran the od -c filename to check for carriage return characters. There are no carriage returns.

---------- Post updated at 01:48 PM ---------- Previous update was at 01:46 PM ----------

...
10,117
Posted By karthik_ak
@lucas That didnt work as well!
@lucas

That didnt work as well!
10,117
Posted By karthik_ak
I have attached the file.please rename the...
I have attached the file.please rename the extension to csv.
I wasnt able to upload a csv file.
10,117
Posted By karthik_ak
The code by Don removes the entire line before...
The code by Don removes the entire line before and after the first broken line.

The Code by Scrutinizer aslo does the same and each line repeats itself.
10,117
Posted By karthik_ak
how? Sorry i'm very new to unix!!
how?
Sorry i'm very new to unix!!
10,117
Posted By karthik_ak
But the problem is what if the broken line is...
But the problem is what if the broken line is like this where the it is starting with a comma(,) like this?


abcd,732656,20140211,20140202,58461.10
,C,INR,,,Settlement of purchase.,,1

...
10,117
Posted By karthik_ak
Thanks a lot Ahamed. I used the below to...
Thanks a lot Ahamed.

I used the below to autocorrect and it worked :)


perl -pi -e 's/,\r+\n//g;s/\n,/,/g' ' infile.



I have few more queries

below is the description of what...
10,117
Posted By karthik_ak
This didnt work as well!! I;m using the...
This didnt work as well!!

I;m using the command you suggested in a shell script file


awk '/,$/{printf $0;next}1' ${infile} >> ${outfile}


The outfile and infile are exactly the same....
10,117
Posted By karthik_ak
This is the actual data in a csv file. ...
This is the actual data in a csv file.


abcd,789756,20140211,20140202,464532.00,C,XZY,,,Settlement of purchase.,,1
abcd,795156,20140211,20140202,548962.52,C,JPY,,,Payement to: tokyo BNF=N,,1...
10,117
Posted By karthik_ak
I tried all the commands, perl and awk in shell...
I tried all the commands, perl and awk in shell script in UNIX.
10,117
Posted By karthik_ak
Yes yes i'm aware that these dont edit the...
Yes yes i'm aware that these dont edit the orignal file.

All i'm doing is redirecting the output of these commands into another file.

I cant get the actual code. But it is exactly the same as...
10,117
Posted By karthik_ak
I tried the codes which you guys gave. None of...
I tried the codes which you guys gave. None of them work, all they do is just write the recrods as it is.
10,117
Posted By karthik_ak
Auto correct a csv file using UNIX shell script.
Hi All,

There are list of 4-5 .csv files which has 12 columns.In some cases one of the record is split into 2 records. What needs to be done is this split record has to be auto corrected and...
1,686
Posted By karthik_ak
Auto correct a csv file using UNIX shell script.
Hi All,

There are list of 4-5 .csv files which has 12 columns.In some cases one of the record is split into 2 records. What needs to be done is this split record has to be auto corrected and...
Showing results 1 to 17 of 17

 
All times are GMT -4. The time now is 09:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy