tilde substitution

From: Gerencia do CI <manager_at_minerva.ufpel.tche.br>
Date: Tue, 9 Jan 1996 16:41:37 -0200 (EDT)

   Fellows,

   I'm having some trouble with the tilde substitution within a script.
I need to use it to find out the home directory of a user, but the
username is passed to my script as a variable. Here's the problem:

   
   #!/bin/ksh

   # Actually, the variable below is set by another program:
   usuario="snoopy"

   # I'd like the command below to return, say, /usr/users/snoopy
   # but it doesn't...
   echo ~$usuario

--------------------------------------------------------------------

   I tried many (weird) :) combinations of ` ` and " ", but without
success... Can someone point me the way?

   Thanks!

   Henrique Avila Vianna
   snoopy_at_ufpel.tche.br
Received on Tue Jan 09 1996 - 20:10:32 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT