Quick Bash question.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Quick Bash question.
# 1  
Old 07-08-2011
Quick Bash question.

Hi,

I'm basically looking to see what this line of code does:

Code:
. `dirname $0`/../config/config

Thanks.
# 2  
Old 07-08-2011
One directory up (..) from where your script is (dirname $0), there is a directory called "config". In there is a file called "config". The line sources that file into your current shell environment.

Code:
. `dirname $0`/../config/config
=
source `dirname $0`/../config/config
=
. ${0%/*}/../config/config

This User Gave Thanks to Scott For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Quick question: calling c-shell script from bash

Hello, I have a quick reference question: I have a very long, but fairly straigtforward script written in c-shell. I was wondering if it is possible to call this script from bash (for ex. having a function in bash script which calls the c-shell script when necessary), and if so, are there any... (1 Reply)
Discussion started by: lapiduslost
1 Replies

2. Shell Programming and Scripting

Quick bash question

I need to speed up this process. I would like for this script to spawn a sub-process for each line it reads and move on to the next without waiting for the data to be returned. I know with a large list this can be dangerous and eat system resources. However I use this script only when I get a... (7 Replies)
Discussion started by: Garlandxj08
7 Replies

3. UNIX for Dummies Questions & Answers

Quick question

Hi guys Quick question Im creating an FTP server and im chrooting each user to there home directory blah blah. Ive also setup scponly so there locked etc. Im a novice at unix and have just reaslised the primary group of scponly is the username of one of the ftp users... which im sure... (1 Reply)
Discussion started by: mokachoka
1 Replies

4. Shell Programming and Scripting

Quick question

When I have a file like this: 0084AF aj-123-a NAME Ajay NAME Kumar Engineer 015ED6 ck-345-c 020B25 ef-456-e 027458 pq-890-p NAME Peter NAME Salob Doctor 0318F0 xy-123-x NAME Xavier Arul NAME Yesu Supervisor 0344CA de-456-d where - The first NAME is followed by... (6 Replies)
Discussion started by: ajay41aj
6 Replies

5. Shell Programming and Scripting

quick newbie bash question

I'm in .profile. I want to export a directory ( export MY_TOOL_HOME=/tools/my tool". Unfortunately for me, the directory I want to export to has a space in its name. So when I try to cd $MY_TOOL_HOME, i get a No such file or directory at the command line... thanks for the help (4 Replies)
Discussion started by: redsand9009
4 Replies

6. AIX

quick question

Hi, At best I'm a junior admin with a big problem. My developers have got my root password and mgmt insists they need it. I can't even change it when people knowing it leave. I'm certain they've hardcoded it into routines. I've searched my servers and grepped everything & can't find it. ... (5 Replies)
Discussion started by: keith.m
5 Replies

7. UNIX for Dummies Questions & Answers

Quick question

Hi, Is there a simple way, using ksh, to find the byte position in a file that a stated character appears? Many thanks Helen (2 Replies)
Discussion started by: Bab00shka
2 Replies

8. UNIX for Dummies Questions & Answers

Quick Question

Hi, I am new to UNIX, and am learning from this tutorial : http://www.ee.surrey.ac.uk/Teaching/Unix/index.html It keeps telling me to files downloaded from the internet (like .txt files) to the directory, and I dont know how to. How do I add .txt files to my directory? Thanks. (6 Replies)
Discussion started by: IAMTHEEVILBEAN
6 Replies

9. Shell Programming and Scripting

A very quick question

Just a super quick question: how do you put a link in your php code. I want to make a link to something in /tmp directory. i.e. how do you put a href into php, I think it's done a bit differently. thanks john (1 Reply)
Discussion started by: jmg5
1 Replies

10. UNIX for Dummies Questions & Answers

Quick Question

I know in DOS, when you want to pull up your last/previous command, you hit the up/down arrows. How do you do that with UNIX? (3 Replies)
Discussion started by: Tracy Hunt
3 Replies
Login or Register to Ask a Question