Re: flexible filenames?
- From: merritt@xxxxxxxxxxxxxxxx (Ethan Merritt)
- Date: Thu, 12 Jun 2008 08:47:58 -0700 (PDT)
In article <hrb4k.131424$Ex2.93657@xxxxxxxxxxxxx>,
Bart Vandewoestyne <MyFirstName.MyLastName@xxxxxxxxxx> wrote:
On 2008-06-06, merritt@xxxxxxxxxxxxxxxxxxxxxxxxxxx <merritt@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:The ! mechanism is the wrong way to go. Use the system() command instead.
Yes, certainly. Here is a simple example that show 2 possible
command variants for defining the file names.
N = 1
outfile = "graph_dim".N.".eps"
infile = sprintf("data_dim%02d.eps",N)
set output outfile
plot infile ....
Thanks for this interesting suggestion. I do however also sometimes use
the ! symbol to escape to my shell. And in the commands after
the ! symbol i would also like to use the above principle of
dynamically building up my filenames.
Consider the following example:
s=8
! echo s
! echo $s
! echo sprintf("%02d", s)
None of the above three echo commands shows the value for s. How would
i do that?
command = "echo ".s
system(command)
--
Ethan A Merritt
.
- Follow-Ups:
- Re: flexible filenames?
- From: Juergen Wieferink
- Re: flexible filenames?
- References:
- flexible filenames?
- From: Bart Vandewoestyne
- Re: flexible filenames?
- From: merritt
- Re: flexible filenames?
- From: Bart Vandewoestyne
- flexible filenames?
- Prev by Date: Re: flexible filenames?
- Next by Date: Re: flexible filenames?
- Previous by thread: Re: flexible filenames?
- Next by thread: Re: flexible filenames?
- Index(es):
Relevant Pages
|