Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Dec 2000 20:00:51 -0800
From:      David <davidd@datasphereweb.com>
To:        Aaron Hill <hillaa@hotmail.com>
Cc:        questions@freebsd.org
Subject:   Re: Script: Variable substition within a variable?
Message-ID:  <20001217200051.A97413@datasphereweb.com>
In-Reply-To: <F175g2UVe3lQN5vnoqt00000f22@hotmail.com>; from hillaa@hotmail.com on Mon, Dec 18, 2000 at 03:53:19AM %2B0000
References:  <F175g2UVe3lQN5vnoqt00000f22@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 18, 2000 at 03:53:19AM +0000, Aaron Hill wrote:
> Hello!
> 
> Can anyone help with a script problem I'm having. Please let me explain what 
> I'm trying to do with two example files...
> 
> fileone:
> $name
> 
> 
> filetwo:
> #!/bin/sh
> 
> name="Aaron"
> fileone=`cat fileone`
> 
> echo "Your name is $fileone"
> 
> 
> When you execute filetwo this is the output you get:
> Your name is $name
> 
> The output I would like to get is:
> Your name is Aaron
> 
> 
> Can anyone point out if I've missed something fundamental or if there's 
> something that could help me do this substition.
I think what you're looking for is something along the lines of:
echo "Your name is " $fileone

-- 
|> /\ \/ @
davidd@datasphereweb.com
DataSphere - Back end web programming, site security, and networking

david.daugherty@netmanage.com
Software Engineer
NetManage - The Bridge to E-Business

http://www.wcug.wwu.edu/~doc
ICQ: 21106703

"I like the dreams of the future better than the history of the past"
                                   -Thomas Jefferson


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001217200051.A97413>