Linux dollar sign in front of directory


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Linux dollar sign in front of directory
# 1  
Old 06-13-2018
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  
Old 06-13-2018
Config files can be read and used by different kinds programs, not just bash. That config file would fail miserably as a bash script based just on the use of spaces.

It seems to me it means translate (or substitute) the string that is stored in the dir variable - kind of like dereferencing if you will. The author probably figured that $ prepend would improve reading clarity for us UNIX types. Maybe not.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Linux expand dollar sign in single quotes

I am trying to get a dollar sign variable to be expanded in single quotes. Not sure what I am doing wrong. I have tried every way I can think of. for i in `cat file1` do for j in `cat file2` do ssh $i 'systemctl is-enabled "${j}" '; done done... (4 Replies)
Discussion started by: cokedude
4 Replies

2. Linux

Linux command to find and replace occurance of more than two equal sign with "==" from XML file.

Please help me, wasted hrs:wall:, to find this soulution:- I need a command that will work on file (xml) and replace multiple occurrence (more than 2 times) Examples 1. '===' 2. '====' 3. '=======' should be replaced by just '==' Note :- single character should be replaced. (=... (13 Replies)
Discussion started by: RedRocks!!
13 Replies

3. Shell Programming and Scripting

substitute the starting dollar sign in command with blank

Hi,, Let example cmd: $$config/all Here I want to replace or subsitute blank space and also with any other character in place of "$" sign...and also want to replace backslash (/) with forward (\)......in expect script please could any one help on this.....thank you (2 Replies)
Discussion started by: swethakast
2 Replies

4. UNIX for Dummies Questions & Answers

Communicate to the OS(linux) using front end.

Hi guys , I want to develop a web page which is capable of executing the command on os and show the output on the browser.(Which involves reading and writing too.) I m using jsp language to develop the web page. How would i use it to communicate with my linux server? Any... (3 Replies)
Discussion started by: pinga123
3 Replies

5. UNIX for Dummies Questions & Answers

Sign up address for linux forum eNews

Does anyone have this handy Thanks (0 Replies)
Discussion started by: 77yrold
0 Replies

6. UNIX for Advanced & Expert Users

Problem: Single Sign On for linux

Hi gurus, I'd like to know your opions about Single Sign On (SSO) for linux (Debian). In my company, clients want to access to different services (FTP, HTTP, Mail, Web Applications ). I think about OpenLDAP and Proxy (Squid, Vulture) to resolve this problem but i'm not sure if they can. Are there... (0 Replies)
Discussion started by: thanhdat
0 Replies

7. Shell Programming and Scripting

Sign on/Sign off logging script

I'd like to make a script that I can execute every time I sign on to my linux box that keeps track of the time and allows to me to add a remark to a file. So basically once I log in, I run the script, and it outputs the date and time to a text file (log.txt). But that isn't my problem. I need... (1 Reply)
Discussion started by: Glider
1 Replies

8. UNIX for Dummies Questions & Answers

Are their any Front Page 2000 *linux* programs?

I am looking for an alternative. I am not wanting to try and run it using one of those fancy programs that can run windows programs. I am trying to cut the chord from MS so I am looking for good similar programs. Any thoughts? If there are none, then I guess I try to run it under Linux. ... (6 Replies)
Discussion started by: wizkid
6 Replies
Login or Register to Ask a Question