Re: substitute variable
- From: Ed Morton <morton@xxxxxxxxxxxxxx>
- Date: Wed, 30 Jan 2008 10:08:35 -0600
On 1/30/2008 9:57 AM, Richard wrote:
Hi,
I want to substitute a variable. My script code is
#!/bin/sh
MYDIR="/usr/"
echo "${MYDIR}file.cpp"
What I want to see after running the script (ksh)
Why did you say "(ksh)" when your shebang says "/bin/sh"?
is /usr/file.cpp but
what I see is only file.cpp.
That's hard to believe. Assuming your script is in a file named "foo" under your
current directory, do this:
$ cat foo
$ ./foo
and post the result.
Ed.
.
- References:
- substitute variable
- From: Richard
- substitute variable
- Prev by Date: substitute variable
- Next by Date: Re: substitute variable
- Previous by thread: substitute variable
- Next by thread: Re: substitute variable
- Index(es):
Relevant Pages
|