Re: here-document in function and temp file
- From: Shurik <shurikgefter@xxxxxxxxx>
- Date: Tue, 16 Mar 2010 14:36:02 -0700 (PDT)
On Mar 15, 9:16 pm, Shurik <shurikgef...@xxxxxxxxx> wrote:
On Mar 15, 7:25 pm, Sven Mascheck <masch...@xxxxxxxxxxxxx> wrote:
Shurik wrote:
I have the following function definition on HP-UX ( ksh shell )
[here-document inside function]
I see that after the definition created temp file in /tmp/sh<process_id>.1
Yes, this is a common behaviour of Bourne and Korn (ksh88) shells.
Can I change the temp location?
No, except you want to "in-place" edit the compiled-in path in the ksh binary.
However, there's a workaround: put the function body into "eval".
function() {
eval 'cat<<EOF
EOF
'
}
--http://www.in-ulm.de/~mascheck/bourne/common.html
Sven, thanks a lot, now I don't have temp file
I found that if I defined function as below
function CheckDB
.....
The temp file created, but if I use the other option for function
definition
CheckDB()
......
The temporary file doesn't created.
Why?
.
- Follow-Ups:
- Re: here-document in function and temp file
- From: Sven Mascheck
- Re: here-document in function and temp file
- References:
- here-document in function and temp file
- From: Shurik
- Re: here-document in function and temp file
- From: Sven Mascheck
- Re: here-document in function and temp file
- From: Shurik
- here-document in function and temp file
- Prev by Date: Re: How to determine integer?
- Next by Date: Re: here-document in function and temp file
- Previous by thread: Re: here-document in function and temp file
- Next by thread: Re: here-document in function and temp file
- Index(es):