|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | 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. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Error in while loop
I have a file Table.out having table name like this Code:
Table_Emp Table_Exp Table_Fcr To show first 10 rows .. I' wrtng a script like this .. [CODE]#!/bin/ksh cat /tmp/table.out|while read -r table vbar1 do <connect to db> then select * from $table limit 10; > /tmp/1.out done [/CODE Plz help ..But This is resulting in error like this Code:
ERROR: 'select * from limit 1;' error ^ found "LIMIT" (at char 16) expecting an identifier found a keyword |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
Your code tags are destroyed.
What does the quoting in your <connect ... limit 10; code snippet look like? |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Rudic Code:
]#!/bin/ksh cat /tmp/table.out|while read -r table vbar1 do <connect to db> then select * from $table limit 10; > /tmp/1.out done |
|
#4
|
|||
|
|||
|
It certainly is NOT <connect to db> verbatim! What about the quoting therein?
|
| Sponsored Links | ||
|
![]() |
| Tags |
| sql output |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Getting error in while loop | manishdivs | Shell Programming and Scripting | 1 | 09-01-2011 01:28 AM |
| While loop error | reid | Shell Programming and Scripting | 4 | 08-19-2011 02:30 PM |
| Error Using an if Loop Within a While Loop | jonesdk5 | Shell Programming and Scripting | 4 | 06-03-2010 11:32 AM |
| error in for loop??? | f_o_555 | UNIX for Dummies Questions & Answers | 4 | 01-13-2010 02:18 AM |
| Error in Loop? | rdhaprakasam | Shell Programming and Scripting | 5 | 02-18-2009 06:52 PM |
|
|