Wanted: Syntax for here-document in function 
Author Message
 Wanted: Syntax for here-document in function

Hello *,

Must be a newby level question, but it's late and i had too much coffee
;-)
the script dumpload has only this: (apart from a piece that defines
$run_sybase)

fullload() {
$run_sybase << stophere
load database $1 from $ftpinbox
go
stophere ; }

now i'm not calling this function yet, but I get a

./dumpload: syntax error at line 12: `end of file' unexpected

that puzzles me, any idea? I've tried some variations, but I can't get a

herescript in function.



Sat, 02 Aug 2003 22:48:35 GMT  
 Wanted: Syntax for here-document in function

Quote:

> Hello *,

> Must be a newby level question, but it's late and i had too much coffee
> ;-)
> the script dumpload has only this: (apart from a piece that defines
> $run_sybase)

> fullload() {
> $run_sybase << stophere
> load database $1 from $ftpinbox
> go
> stophere ; }

be honest I've no clue, but does the ; need
to be outside the bracket?


Sat, 02 Aug 2003 22:57:47 GMT  
 Wanted: Syntax for here-document in function
No, the ; is a commandseperator in the function.  (and of course I tried to
play with the ; , putting it everywhere, nowhere etc. Even outside the {}
doesn't help :(
Quote:


> > Hello *,

> > Must be a newby level question, but it's late and i had too much coffee
> > ;-)
> > the script dumpload has only this: (apart from a piece that defines
> > $run_sybase)

> > fullload() {
> > $run_sybase << stophere
> > load database $1 from $ftpinbox
> > go
> > stophere ; }

> be honest I've no clue, but does the ; need
> to be outside the bracket?



Sat, 02 Aug 2003 23:45:11 GMT  
 Wanted: Syntax for here-document in function

Quote:

> Hello *,

> Must be a newby level question, but it's late and i had too much coffee
> ;-)
> the script dumpload has only this: (apart from a piece that defines
> $run_sybase)

> now i'm not calling this function yet, but I get a

> ./dumpload: syntax error at line 12: `end of file' unexpected

> that puzzles me, any idea? I've tried some variations, but I can't get a

> herescript in function.

fullload() {
$run_sybase << stophere
load database $1 from $ftpinbox
go
stophere

Quote:
}

The semaphore (stophere) must be on a line by itself.

--
Dan Mercer

Opinions expressed herein are my own and may not represent those of my employer.



Sun, 03 Aug 2003 00:47:57 GMT  
 Wanted: Syntax for here-document in function
I also tried that - still no go :-(
Quote:



> > Hello *,

> > Must be a newby level question, but it's late and i had too much coffee
> > ;-)
> > the script dumpload has only this: (apart from a piece that defines
> > $run_sybase)

> > now i'm not calling this function yet, but I get a

> > ./dumpload: syntax error at line 12: `end of file' unexpected

> > that puzzles me, any idea? I've tried some variations, but I can't get a

> > herescript in function.

> fullload() {
> $run_sybase << stophere
> load database $1 from $ftpinbox
> go
> stophere
> }

> The semaphore (stophere) must be on a line by itself.

> --
> Dan Mercer

> Opinions expressed herein are my own and may not represent those of my employer.



Sun, 03 Aug 2003 16:44:30 GMT  
 Wanted: Syntax for here-document in function
oh oh , removed a whitespace and... it all works... thanx for the help everyone :-)
Quote:



> > Hello *,

> > Must be a newby level question, but it's late and i had too much coffee
> > ;-)
> > the script dumpload has only this: (apart from a piece that defines
> > $run_sybase)

> > now i'm not calling this function yet, but I get a

> > ./dumpload: syntax error at line 12: `end of file' unexpected

> > that puzzles me, any idea? I've tried some variations, but I can't get a

> > herescript in function.

> fullload() {
> $run_sybase << stophere
> load database $1 from $ftpinbox
> go
> stophere
> }

> The semaphore (stophere) must be on a line by itself.

> --
> Dan Mercer

> Opinions expressed herein are my own and may not represent those of my employer.



Sun, 03 Aug 2003 17:40:35 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. wanted: IBM ST/VA 2.0 Documents

2. ACTOR/ACTOR MACHINE documents wanted

3. Implementing letrec-syntax using only let-syntax and syntax-rules

4. Document about ext vcd format wanted

5. Mouse-port reading help/documents wanted.

6. Design/document/reference of motion encoder interface wanted

7. Mouse-port reading help/documents wanted.

8. Wanted: module to access MS-Word Documents

9. Wanted: Algorithm for approximate document comparison

10. help on NAG document wanted

11. Parlog documents wanted

12. ACTOR/ACTOR MACHINE documents wanted

 

 
Powered by phpBB® Forum Software