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)

koriordan at compsoc.com koriordan at compsoc.com
Tue Nov 21 16:19:07 GMT 2000


would it not be better to get the users homedir from /etc/passwd ?
yeah it invokes 2 extra processes, but at least it's clearer ...

#!/bin/bash
#
# homedir
#
HOMEDIR=`grep "$1" /etc/passwd|cut -d":" -f 6`
echo $HOMEDIR



On Tue, Nov 21, 2000 at 02:10:45PM +0000, kevin lyda wrote:
> On Tue, Nov 21, 2000 at 12:51:50PM +0000, Niall O Broin wrote:
> > Given this little script called homedir
> > 
> > #!/bin/sh
> > echo ~$1
> 
> eval echo ~$1
> 
> kevin
> 
> -- 
> kevin at suberic.net        q: what's the difference between batman & b. gates?
> fork()'ed on 37058400    a: when batman fought the penguin, he won.
> meatspace place: home                             http://suberic.net/~kevin/
>  >> want privacy? www.gnupg.org or www.pgp.com.  encrypted mail preferred <<
> 
> -- 
> Irish Linux Users' Group: ilug at linux.ie
> http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
> List maintainer: listmaster at linux.ie

-- 
	"Applaud us when we stick,
	 Console us when we fall"
	 --graffiti from a pig-sticking wall in bogeydom
	   (Fungus the Bogeyman, by Raymond Briggs)




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