Profile

Cover photo
Rajendra Prasad
Lives in Banglore
90 followers|48,217 views
AboutPostsPhotosVideosReviews

Stream

Rajendra Prasad

Discussion  - 
 
Can any one provide me script to convert fixed length file to CSV
1
Rajendra Prasad's profile photoGergely Szabó's profile photo
3 comments
 
Okay. so this might work:


groovy:000> new File("/tmp/test0.txt").text
===> FOO1234AAA
BAR5678BBB

groovy:000> new File("/tmp/out.csv") << ((new File("/tmp/test0.txt").getText().split("\n").collect{line-> [line[0..2],line[3..6],line[7..8]]}).collect{mbers->mbers.join(',')}).join("\n")
===> /tmp/out.csv
groovy:000> new File("/tmp/out.csv").text
===> FOO,1234,AA
BAR,5678,BB
groovy:000>

Add a comment...

Rajendra Prasad

Shared publicly  - 
1
Add a comment...

Rajendra Prasad

Shared publicly  - 
1
Add a comment...

Rajendra Prasad changed his profile photo.

Shared publicly  - 
3
Avik Ghosh's profile photo
 
This is my click :)
Add a comment...

Rajendra Prasad changed his profile photo.

Shared publicly  - 
1
Add a comment...

Rajendra Prasad

Shared publicly  - 
 
Happiness and satisfaction in life depends on how much is considered enough.
1
Add a comment...
Story
Tagline
Be Kind Whenever Possible. It is Always Possible
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Banglore
Previously
Karimnagar - Kolkata - Hyderbad - Cleaveland
Links
Work
Occupation
SAP consultanat
Basic Information
Gender
Male
Looking for
Friends, Networking
Relationship
Single
Other names
Rajendra Prasad