Hi Ravinder/Rudi,
Both the codes are not impacting the file and copying the file as is.
5, jaya, male, 4-5-90, single
-smart
6, prakash, male, 5-4-84, married
-fair
7, raghavi, female, 12-10-85, married
calm
-talented
9, bhaskar, male, 29-12-92, single
-studios
5, jaya, male, 4-5-90, single-smart
6, prakash, male, 5-4-84, married-fair
7, raghavi, female, 12-10-85, marriedcalm-talented
9, bhaskar, male, 29-12-92, single-studios
I'm pasting my sample original file below
5,1,32784506,6/3/2015,6/3/2015,9:15:22,6/3/2015,9:15:34,0,16,0,Validate
Class [TGWFTRNBO]],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
6,1,32784506,6/3/2015,6/3/2015,9:15:22,6/3/2015,9:15:34,0,16,0,Validate
Class [TGWFTRNBO]],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
7,1,32784506,6/3/2015,6/3/2015,9:15:22,6/3/2015,9:15:34,0,16,0,Validate
Class [TGWFTRNBO]],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
The operative account
10,1,32784506,6/3/2015,6/3/2015,9:15:22,6/3/2015,9:15:34,0,16,0,Validate
Class [TGWFTRNBO]],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
It is ok even if the commas in second line is concatenated with before line.
---------- Post updated at 07:32 PM ---------- Previous update was at 07:16 PM ----------
Guys-
Ravinder and Rudi. You are simply AWESOME!! Hats OFF
The script you provided is working great. Thanks a lot.
Regards,
Jaya
---------- Post updated at 07:42 PM ---------- Previous update was at 07:32 PM ----------
Ravinder,
It is working fine with your script. One more need is that, I want to remove those commas followed by the line starting with number while concatenating.
Sample input file
5,1,32784506,6/3/2015,6/3/2015,9:15:22,6/3/2015,9:15:34,0,16,0,Validate
Class [TGWFTRNBO]],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
6,1,32784506,6/3/2015,6/3/2015,9:15:22,6/3/2015,9:15:34,0,16,0,Validate
Class [TGWFTRNBO]],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
7,1,32784506,6/3/2015,6/3/2015,9:15:22,6/3/2015,9:15:34,0,16,0,Validate
Class [TGWFTRNBO]],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
The operative account
10,1,32784506,6/3/2015,6/3/2015,9:15:22,6/3/2015,9:15:34,0,16,0,Validate
Class [TGWFTRNBO]],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
output should be like
5,1,32784506,6/3/2015,6/3/2015,9:15:22,6/3/2015,9:15:34,0,16,0,ValidateClass[TGWFTRNBO]]
6,1,32784506,6/3/2015,6/3/2015,9:15:22,6/3/2015,9:15:34,0,16,0,ValidateClass[TGWFTRNBO]]
7,1,32784506,6/3/2015,6/3/2015,9:15:22,6/3/2015,9:15:34,0,16,0,ValidateClass[TGWFTRNBO]]The operative account
10,1,32784506,6/3/2015,6/3/2015,9:15:22,6/3/2015,9:15:34,0,16,0,ValidateClass [TGWFTRNBO]]
Regards,
Jaya