Basic variable questions


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Basic variable questions
# 1  
Old 02-28-2008
Basic variable questions

when you see something like this

export SOMEDATA=.:/somedir/files

what does the ".:" mean?

I think the the "." alone would mean current directory but the ":" together is kind of new to me.
# 2  
Old 02-28-2008
You are quite right... so it means /somedir/files & in the "current directory" (can lead to unexpected issues...)

Last edited by vbe; 02-28-2008 at 01:43 PM..
# 3  
Old 02-28-2008
It depends on the meaning of the SOMEDATA variable itself... What you put after the equal sign is only a string of characters!

If SOMEDATA is, for example, the PATH variable, the colon is used to delimit each directory. In your case, the specified directories are two: "." (=current directory) and "/somedir/files" directory.
# 4  
Old 02-28-2008
When I echo $SOMEDATA I get .:/somedir/files

What I'm not seeing is the purpose of coding this. Are they assigning 2 directories to SOMEDATA? One being current and the other being /somedir/files delimited by ":"?

BTW, I need to decipher scripts for work and I'll have more questions from the looks of it.

TIA
# 5  
Old 02-28-2008
I would say, for a search path perhaps: look first in current directory if not found go to /somedir/files. But I fell like you.. Why would you expect something in 2 locations...
# 6  
Old 02-28-2008
But thanks, I guess its clearer now.
# 7  
Old 02-28-2008
But ":" can also be a substring operator to extraxt a part of a line (man expr...)
Dont see what else (hope I have helped a little..)
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Solaris

basic questions on ifconfig -a

lo0: flags=1000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 qfe0: flags=1004843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 10.0.0.112 netmask ffffff80 broadcast 10.0.0.127 ether 8:0:20:b9:4c:54 qfe1: flags=1004843... (2 Replies)
Discussion started by: jtamminen
2 Replies

2. Shell Programming and Scripting

basic awk questions

I find an script with awk sitting around. I went through some online manuals, but I can't figure out exactly how it works. I can't post the whole program. Not allowed. This is the line that is confusing me. I get when else is in the script grep -v "^REM " $1| grep -v "JUNK;" | awk -F" "... (2 Replies)
Discussion started by: guessingo
2 Replies

3. Solaris

solaris 10 and a few basic questions

hello, first, I'm quite new to solaris. I've installed solaris 10 basic (item 4 on the install-menue). now I had to realize that I don't have any option for connecting the machine from remote. ssh isn't even installed although I've coosed 'yes' for remote access. no matter what solaris is... (10 Replies)
Discussion started by: fourty2
10 Replies

4. UNIX for Dummies Questions & Answers

some basic questions about unix ..

Hi all today i gone through worst interview of my life that for hour questions were so basic but i never though about them now i am figuring out answers my self but i would appreciate if you ppl help me ... i am listing some of the questions i remember .. 1 ) $ cat a.sh #! /usr/bin/ksh... (4 Replies)
Discussion started by: zedex
4 Replies

5. UNIX for Dummies Questions & Answers

hp-ux basic questions

I have multiple questions How to list or find only Nov month's files? How can I get state of process like running, stop, or sleep etc? How can I check dependences of processes? plz ans any if u can thx regards, Mazhar Hussain (3 Replies)
Discussion started by: mazhar99
3 Replies

6. UNIX for Dummies Questions & Answers

Some basic questions

Hi- Newbie here with some basic questions: 1) I can't get alias to work. I tried alias ll='ls -al', but it doesn't work. When just typing 'alias', the new definition doesn't appear. I'm in a bash shell -- is that the problem. I tried switching to csh, but that didn't seem to help. This... (5 Replies)
Discussion started by: Aworstell
5 Replies

7. UNIX for Dummies Questions & Answers

basic UNIX questions

Can somebody please tell me a little about UNIX OS. For instance, is it ideal for digital media or how easy is it to get help and support? (3 Replies)
Discussion started by: buk5d
3 Replies

8. Slackware

Basic networking questions.

Hey, I'm new to Linux. I have a few questions about it. I run Slackware. After the installation the Linux installation had problems with my old hardware (network card, sound card) so I removed them and Linux would start. But now, I can't seem to use the network card in Linux because it's not... (3 Replies)
Discussion started by: RellioN
3 Replies
Login or Register to Ask a Question