Re: [LIP] bash variable expansion

Amit Kucheria <[email protected]>
Newsgroups gmane.user-groups.linux.india.programmers
Message-ID <[email protected]>
On Tue, 18 Nov 2003, Raj Mathur wrote:

> >>>>> "Amit" == Amit Kucheria <[email protected]> writes:
> 
>     Amit> Hi, I have a small script below to copy a set of files to a
>     Amit> set of machines on the network. I can't figure out how to
>     Amit> enable tilde expansion for the first instance of 'fname' in
>     Amit> the script even after RTFMing the bash manpage. Any help is
>     Amit> appreciated.
> 
> If your user ID is in $x, you can tilde-expand it with:
> 
> eval echo ~$x

Bingo! That works. Thanks.

-- 
I'm an angel!!! Honest!
The horns are just there to hold the halo up straight.



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.