Linux dollar sign in front of directory
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2011
    Posts
    365

    Linux dollar sign in front of directory

    I'm looking at a config file with dollar signs. What do the dollar signs mean in front of a directory?

    Code:
    dir = ./demoCA # Where everything is kept
    certs = $dir/certs # Where the issued certs are kept
    crl_dir = $dir/crl # Where the issued crl are kept
    new_certs_dir = $dir/newcerts # default place for new certs.

  2. #2
    Join Date
    Aug 2007
    Posts
    268

    Re: Linux dollar sign in front of directory

    This has nothing to do with directories per se but has to do with variables. The string of characters following the dollar sign is a variable that is being de-referenced, that is its contents are being accessed.

    If dir = ./demoCA

    then $dir/certs == ./demoCA/certs

  3. #3
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    5,400

    Re: Linux dollar sign in front of directory

    dir=abc

    to use the value stored in dir you need to use the $

    echo $dir or echo "$dir"

    echo dir will just display dir
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

Similar Threads

  1. Replies: 8
    Last Post: 16th August 2014, 11:18 PM
  2. Single sign-on for Windows/Linux/Mac OS X
    By Flounder in forum Wibble
    Replies: 2
    Last Post: 25th June 2013, 08:42 PM
  3. Replies: 16
    Last Post: 8th February 2012, 05:19 AM
  4. The $99 dollar SSD has arrived
    By hlfmanhlfamzng in forum Wibble
    Replies: 28
    Last Post: 23rd February 2008, 12:29 PM
  5. Replies: 0
    Last Post: 13th May 2007, 06:49 PM

Posting Permissions

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