Hi,
First question:
In a simple practice script I have the following line:
mkdir $1/public_html
I want that line to create a directory called public_html under the user's
default home.
As it stands, (as written above), the command line would have to be "sh
nameofscript ~username".
I want to be able to do away with the tilde "~" on the command line.
How can I write the script so that the "~" is put in by the script?
In other words, the command line would be "sh nameofscript username".
The script would then insert the "~" and the system would know that it means
the default home directory.
I tried the obvious: "mkdir ~$1/public_html, as well as some variations, but
no go.
*************************************************************************** Second question: If I log in as say, user1, and do a command line like this: echo $HOME I get the path to my default home directory. How can I, logged in as say root, ask the system "What is user22's default Or, "What is user22's $HOME"? *************************************************************************** Thanks,
*****
home directory"?
******