Find the answer to your Linux question:
Results 1 to 4 of 4
Prompt the user for the name of a folder and read the value they enter. Check to see if it exists in your home directory. If it does ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2012
    Posts
    2

    Linux Script user/file


    Prompt the user for the name of a folder and read the value they enter.
    Check to see if it exists in your home directory. If it does exist on your desktop, print a message saying so. If it does not exist, create it in your home directory.
    Move the TAR file created earlier into it


    Very Confused with this.. anyone know how to make this into a script

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,410
    Hi and welcome

    Sorry, but homework questions shall not be answered due to the forum rules.
    http://www.linuxforums.org/forum/lin...ums-rules.html

    But this guide is a good reference, if you need additional info
    Advanced Bash-Scripting Guide
    You must always face the curtain with a bow.

  3. #3
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,763
    Welcome to LF !
    Since your question sounds like homework I'm providing you some hints
    Prompt the user for the name of a folder and read the value they enter.
    You should be able to do that with 'read' command.

    Code:
     Check to see if it exists in your home directory. If it does exist on your desktop, print a message saying so. If it does not exist, create it in your home directory.
    'if' statement with '-d' option and use 'echo' to print the message. and use 'mkdir' to create a directory

    HTML Code:
     Move the TAR file created earlier into it
    Use mv command to do this.

    HTH
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Oct 2012
    Posts
    2
    thanks alot

Posting Permissions

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