Fixing broken links
Ralf Mardorf
silver.bullet at zoho.com
Wed Feb 17 11:47:26 UTC 2016
On Tue, 16 Feb 2016 22:01:32 -0800, rikona wrote:
>Is this really as hard as it sounds? :-((
My knowledge about bash/dash is limited to things I need, so I might
miss some useful commands to handle pitfalls, I would experience when
writing a script to solve your issue. For me it would be hard and
perhaps impossible.
It doesn't help you with your problem now, but for the future consider
not to use that much likely unneeded links or to write a wrapper for the
(ln) link command, that helps you to manage links already when you
create them (by at least generating a file with comments to the
links), assumed you're using ln, when creating links.
In computer programming languages jump to/go to commands, that do
not jump to a sub-route are frowned upon. Only Assembler requires to
use some kind of branch commands. For high-level languages there might
be a few exceptions for e.g. indexed jumps by pointers too. However, in
general jumps tend to cause so called "spaghetti code". When
programming you at least could add comments, explaining the knot garden
a little bit.
I handle soft-links in a similar way as I handled jumps, when I wrote
programs (this was around > 20 years ago). The more careless we use
soft-links, the more likely we will lose control and often a link might
be unneeded and should be avoided.
Regards,
Ralf
More information about the ubuntu-users
mailing list