Find the answer to your Linux question:
Results 1 to 2 of 2
I have written some scripts under the path root/c4/cuild and in that script i ahve mentione a path like /home/cdot/c4 and i want to replace /home/cdot with some varaible. I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2013
    Posts
    1

    Problem while replacing a directory with some variable


    I have written some scripts under the path root/c4/cuild and in that script i ahve mentione a path like /home/cdot/c4 and i want to replace /home/cdot with some varaible. I wish to write the script in the root and replace the diresctory with the variable in that script. Can you please help me out?

    Thanku

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

    is this script written in bash?
    If yes, have a look at the "positional parameters" explanation and examples here:
    Special Variable Types


    Note:
    I moved the thread here to Programming / Scripting and deleted the duplicates.
    You must always face the curtain with a bow.

Posting Permissions

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