Help with splitter code in JAVA


 
Thread Tools Search this Thread
Top Forums Programming Help with splitter code in JAVA
# 1  
Old 09-19-2010
Help with splitter code in JAVA

I was creating a file using splitter and printwriter. The result in the file come out as:
TO:bbb,ccc,eee
Instead of,
TO:bbb
TO:ccc
TO:eee
May I know what's wrong with this?
# 2  
Old 09-19-2010
Quote:
Originally Posted by eel
I was creating a file using splitter and printwriter. The result in the file come out as:
TO:bbb,ccc,eee
Instead of,
TO:bbb
TO:ccc
TO:eee
May I know what's wrong with this?
We are not psychic. If you want our help on specific issues/problems you're having then you need (need) to post something solid (usually a short snippet of code that we can compile ourselves) that demonstrates the behaviour you don't want, and then we can help you.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk or perl script for preposition splitter

Hello, I am writing a Natural Language Parser and one of the tools I need is to separate prepositional phrase markers which begin with a Preposition. I have a long list of such markers (sample given below)and am looking for a script in awk or perl which will allow me to access a look-up file... (2 Replies)
Discussion started by: gimley
2 Replies

2. Shell Programming and Scripting

File splitter

I have below script which does splitting based on a different criteria. can it be amended to produce required result SrcFileName=XML_DUMP awk '/<\?xml version="1\.0" encoding="utf-8"\?>/{n++} n{f="'"${SrcFileName}_"'" sprintf("%04d",n) ".txt" print >> f close(f)}' $SrcFileName.txt My... (3 Replies)
Discussion started by: santosh2k2
3 Replies

3. Shell Programming and Scripting

Source xml file splitter

I have a source file that contains multiple XML files concatenated in it. The separator string between files is <?xml version="1.0" encoding="utf-8"?>. I wanted to split files in multiple files with mentioned names. I had used a awk code earlier to spilt files in number of lines i.e. awk... (10 Replies)
Discussion started by: santosh2k2
10 Replies

4. Shell Programming and Scripting

File Splitter output filename

Issue: I am able to split source file in multiple files of 10 rows each but unable to get the required outputfile name. please advise. Details: input = A.txt having 44 rows required output = A_001.txt , A_002.txt and so on. Can below awk be modified to give required result current... (19 Replies)
Discussion started by: santosh2k2
19 Replies

5. Shell Programming and Scripting

Text Splitter

Hi, I need to split files based on text: BEGIN DSJOB Identifier "LA" DateModified "2011-10-28" TimeModified "11.10.02" BEGIN DSRECORD Identifier "ROOT" BEGIN DSSUBRECORD Owner "APT" Name "RecordJobPerformanceData" Value "0" ... (16 Replies)
Discussion started by: unme
16 Replies

6. Shell Programming and Scripting

Block of code replacement in Java source code through Unix script

Hi, I want to remove the following code from Source files (or replace the code with empty.) from all the source files in given directory. finally { if (null != hibernateSession && hibernateSession.isOpen()) { //hibernateSession.close(); } } It would be great if the script has... (2 Replies)
Discussion started by: hareeshram
2 Replies

7. Shell Programming and Scripting

Syllable splitter in Perl

Hello, I am a relative newbie and want to split Names in English into syllables. Does anyone know of a perl script which does that. Since my main area is linguistics, I would be happy to add rules to it and post the perl script back for other users. I tried the CPan perl modules but they don't... (6 Replies)
Discussion started by: gimley
6 Replies

8. Programming

can i have an optimal solution for this java code ? Facing Java heap space problem even at 3GB heaps

My desired output is run: for this 1 for this 2 for this 3 for this 4 for this 5 for this 1,2 1->2 for this 2,3 2->3 for this 3,4 3->4 for this 4,5 4->5 for this 1,2,3 1->2,3 (2 Replies)
Discussion started by: vaibhavkorde
2 Replies

9. Shell Programming and Scripting

File splitter by nth row

I need to split a file into n separate files of about the same size. The way the file will be split is at every nth row, starting with the first row, that row will be cut and copied to it's corresponding new file so that each file has unique records. Any 'leftovers' will go into the last file. e.g.... (4 Replies)
Discussion started by: sitney
4 Replies
Login or Register to Ask a Question