I'm working on a python script that passes file locations to an scp subprocess. That's all fine, but I'm in a situation where I may end up concatenating a path with a filename such that there's a double '/
in the path. I know that bash doesn't care if you have multiple file separators, but I'm wondering how exactly that is rectified. Is it bash that strips extra /
s or does it really not matter ever?
I ask because it will save me several lines of code to check for extra /
s while concatenating. I know it's not a big deal, but I'm curious as well. I have a bash script that has the line cd //usr
(instead of cd /usr
), which seems to imply there might be a significance to using multiple /
s in a path
join
andabspath
and such commands. – Falmarri Sep 30 '10 at 18:51