![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to append a block of statements after another block in the file | aoussenko | Shell Programming and Scripting | 5 | 04-13-2009 10:34 AM |
| Broke Perl Script Second pair of eyes NET::FTPSSL | Styles | Shell Programming and Scripting | 4 | 01-12-2009 09:07 PM |
| Script for adding pair of numbers? | ShoSho | Shell Programming and Scripting | 6 | 12-23-2008 01:38 AM |
| Complex Insert block in the Script | niceboykunal123 | Shell Programming and Scripting | 2 | 12-17-2008 07:04 AM |
| How share X servers for pair programming? | siegfried | UNIX Desktop for Dummies Questions & Answers | 0 | 03-10-2006 10:57 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
block of name value pair to db insert statements
Hi, I need to convert the following file into DB insert statements. Code:
$ cat input.txt START name=john id=123 date=12/1/09 END START name=sam id=4234 status=resigned date=12/1/08 END The desired output is Code:
$ cat output.txt
INSERT INTO tbl (name, id, date) VALUES ("john", "123", "12/1/09");
INSERT INTO tbl (name, id, status, date) VALUES ("sam", "4234", "resigned", "12/1/08");
awk, perl, sed anything is fine. Thank you, Vimala |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|