School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,369 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,435 people online right now. Registration is fast and FREE... Join Now!




file operations (storing an array as single line in text file)

 

file operations (storing an array as single line in text file)

seshendrakrishnan

27 Dec, 2008 - 03:25 AM
Post #1

New D.I.C Head
*

Joined: 27 Dec, 2008
Posts: 1

Hai, I need some help

Write a script that will take the following inputs at the command line

- number of records
- entity name
- database name
- host name (optional defaults to localhost/localhost ip address)
- adapter (optional defaults to jdbcmysql)
- filed_delimiter (option defaults to tab \t)

It should dynamically identify the fields in this table and generate a file with the same name as entityname.txt file and insert the first line with the field names in the entity and then insert as many number of records as mentioned in the command line.

employees.txt
first_name TAB last_name TAB middle_name
first_name1 TAB last_name1 TAB middle_name1
first_name2 TAB last_name2 TAB middle_name2
first_name3 TAB last_name3 TAB middle_name3

User is offlineProfile CardPM
+Quote Post


MitkOK

RE: File Operations (storing An Array As Single Line In Text File)

27 Dec, 2008 - 03:29 AM
Post #2

D.I.C Regular
Group Icon

Joined: 9 Aug, 2007
Posts: 356



Thanked: 19 times
Dream Kudos: 250
My Contributions
How much ?
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 09:03PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month