Results 1 to 3 of 3

Thread: Help with Script writing

  1. #1
    Join Date
    Mar 2011
    Beans
    53

    Help with Script writing

    I am writing a script that will install a specific Wine application in a specific place and I wanted to know how I tell the script to create a folder in a certain place on any computer no matter what their user name is.

    Ex. I want the same script to create
    home/john/"wine application folder" and
    home/michael/"wine application folder" or
    home/user_name/"wine application folder"


    how do I tell a script to find out the path and then tell it to write a new folder to that path? Thanks!

  2. #2
    Join Date
    Apr 2012
    Beans
    5,596

    Re: Help with Script writing

    If the script will be run by the user whose home directory is where you want the script to create the folder, then you can use the HOME environment variable e.g.

    Code:
    "$HOME/wine application folder"
    Type

    Code:
    echo $HOME
    in a terminal to see what the current value is

  3. #3
    Join Date
    Mar 2011
    Beans
    53

    Cool Re: Help with Script writing

    Quote Originally Posted by steeldriver View Post
    If the script will be run by the user whose home directory is where you want the script to create the folder, then you can use the HOME environment variable e.g.

    Code:
    "$HOME/wine application folder"
    Type

    Code:
    echo $HOME
    in a terminal to see what the current value is

    Thank you very much!

    Code:
    mkdir $HOME/"wine application folder"
    worked perfectly! You are my hero lol

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •