Lets say I have 3 symbolic links (pointing to different deployment version files).
A -> K
B -> L
C -> M
When I do a new deploy (called H), I would like the end result to look like:
A -> H
B -> K
C -> L
The only information that I have are the names of A, B, and C, and the name of H. The names of K, L, M are unknown me but could be found by following the symbolic links.
How would I make a script in bash shell that does that for me?
(Note: A, B, C are the symbolic links created using ln -s
)