Running the following command works as expected, creating a symlink to src from include/bb:
ln -sf ../src include/bb
However, calling the same command again will cause an additional symlink to src to be created in include/bb aka src/src.
What can I do to prevent it?
Edit:
Apparently this happens when ln is called twice, possibly the semicolon has nothing to do with it after all.
Here's a sequence of commands that will cause this to happen:
mkdir test
cd test
mkdir src
touch src/main.cpp
mkdir include
ln -sf ../src include/bb
ln -sf ../src include/bb
lndoesn't even get to know about the semicolon. Can you edit in a brief script reproducing the issue you're having?