$$ means?

hey, what's $$varname in a script? I used to see $varname only. search on google didn't help. thanks.

$$ = process pid. Was the second $ escaped like this \$ ?

Could be a dynamic variable (perl, php):


$varname = "something";
$$varname = "some data";

print $something;

output would be:
some data

hey, thanks for the reply. with the make -d option I am able to pull about more info for diagonosis. This is the paragraph in the makefile I am working on:

$(EXE): $(OBJS)
bla=;\
for file in $(OBJS); do bla="$$bla `$(CYGPATH_W) $$file`"; done; \
$(CXX) $(CXXLINKFLAGS) $(CXXFLAGS) -o $@ $$bla

and after compileing it with make -d, I got this output on terminal:

bla=;\
for file in decomp.o; do bla="$bla `echo $file`"; done; \
g++ -Wl,--rpath -Wl,/Eclipse_workspace/Smi -g -O0 -o decomp $bla

it is a surprise to me that $$bla is just being replaced by $bla. Any explanations? thanks.

It probably "delays" the interpolation until the "do" part is actually executed, at which point it might substitute the value of bla. The point is to continue to concatenate the contents of $file into a variable named "bla". It's a very strange way of doing it, but then again, I don't know the ins and outs of cygwin.