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.
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.
You are quite right... so it means /somedir/files & in the "current directory" (can lead to unexpected issues...)
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.
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
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...
But thanks, I guess its clearer now.
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..)