User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

twiddle [2006/08/29 16:08] (current)
Line 1: Line 1:
 +# $EPIC: twiddle.txt,​v 1.2 2006/08/20 17:37:08 sthalik Exp $
 +This function is used to do tilde-expansion on the given name.  The tilde
 +is required. ​ If a user exists on the system with a home directory, the
 +full path of that directory is returned. ​ If the user does not exist,
 +nothing is returned. ​ If a tilde is not the first character, the input is
 +This is useful for ensuring that files will be written to your home
 +directory, regardless of the current directory.
 +full path of home directory if user exists, nothing if not, input if error
 +$twiddle(~) ​                 returns your home directory
 +$twiddle(~jvs) ​              ​returns home directory for user jvs
 +$twiddle(~nosuchuser) ​       no such user, returns nothing
 +$twiddle(blah) ​              bad input, returns "​blah"​
twiddle.txt ยท Last modified: 2006/08/29 16:08 (external edit)