I have about 40 symbolic links in a directory that look like this:
lrwxr-xr-x 1 anna staff 45B 22 Jun 11:20 menu-bg-left.jpg -> ../../../../../hg/www/images/menu-bg-left.jpg
lrwxr-xr-x 1 anna staff 46B 22 Jun 11:20 menu-bg-right.jpg -> ../../../../../hg/www/images/menu-bg-right.jpg
I would like to change them all to a different directory:
lrwxr-xr-x 1 anna staff 45B 22 Jun 11:20 menu-bg-left.jpg -> ../../../../../code-local/www/images/menu-bg-left.jpg
lrwxr-xr-x 1 anna staff 46B 22 Jun 11:20 menu-bg-right.jpg -> ../../../../../code-local/www/images/menu-bg-right.jpg
For various reasons I can't just symlink the hg directory to the code-local directory, I need to change the links themselves.
Can I shell script this somehow?
