![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| data transfer from serial port | pankajbraval | SCO | 2 | 10-10-2008 06:57 PM |
| FTP - Data Transfer Limitations. | system-admin | AIX | 2 | 12-20-2006 03:11 AM |
| Data Transfer programs in IPC Mechanisms?? | boris35 | UNIX for Dummies Questions & Answers | 2 | 05-26-2005 01:12 PM |
| data corruption with ftp transfer | malcom | UNIX for Advanced & Expert Users | 12 | 08-04-2003 08:38 AM |
| How much data will transfer at 100 full | 98_1LE | UNIX for Dummies Questions & Answers | 3 | 10-05-2001 10:48 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Transfer data from one file to another
Hi,
I'm relatively new to shell scripting, Ive worked on a few basic scripts and used most of the unix commands in the simplest of situations. But I am now faced with a task that's seems to be beyond me. I have a file with some data in the form of rows and columns : 123 4536 abcd4 677 bbb ggg nnn 32425 343 5656 abcd6 566 eee fff ooo 56454 343 5645 abcd7 556 ddd lll jjj 43536.... . . . and so on I need a shell script to pick this data and put it into an insert command which lies in another text file.The insert command would be in the form insert into table_xyz values ($a,'$b','$c',etc) where the variables would be the values from the above mentioned data file. the output of the script should be as many insert statements as there are lines in the data file.As in, insert into table_xyz values(123, 4536, 'abcd4', 677, 'bbb', 'ggg', 'nnn' ,32425) insert into table_xyz values(343, 5656, 'abcd6', 566, 'eee', 'fff', 'ooo' 56454) etc Some sort of script to store the data in an array or something and iterate through it?Any help,advice would be greatly appreciated... Thanx in advance |
|
||||
|
No duplicate or cross-posting, please read the rules.
Continue here: Transfer data from one file to another Thread closed. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|