[GLLUG] ~ or $HOME ?

Matthew Walster matthew at walster.org
Mon Mar 17 12:16:58 UTC 2014

On 17 March 2014 12:03, Alain Williams <addw at phcomp.co.uk> wrote:

> a) $HOME

​This can be over-written on the shell. It's not perfect, and you'll need
to do some error handling in case someone's done something silly.​

> b) getpwuid() (or similar)

​Wait, are we dealing with C or bash?​

> c) $HOME, but if that is not defined: getpwuid()

That's what "tilde" does by default in bash:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20140317/b18d354e/attachment.html>

More information about the GLLUG mailing list