LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] YABO (Yet another bash oddity)

[ILUG] YABO (Yet another bash oddity)

Niall O Broin niall at magicgoeshere.com
Tue Nov 21 23:47:12 GMT 2000


On Tue, Nov 21, 2000 at 02:10:45PM +0000, kevin lyda wrote:

> > Given this little script called homedir
> > 
> > #!/bin/sh
> > echo ~$1
> 
> eval echo ~$1

This works, and in fact will do exactly what I want with

HOMEDIR=`eval echo ~$1`


What bugs me is that I thought of eval, and I tried it, and it didn't work -
buggered if I can remember what I did wrong. Anyway, script is now written
and working using awk, and for a script which will be run only occassionally
you may be damn sure it's staying the way it it. But I'm glad to have got
the oddity out of the way (only, of course, it's not an oddity at all)

Regards,


Niall





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell