Thank you, that is the approach that I expected.
Could you please give me the concrete example of how to specify the linkname?
The stuff with links (e.g. deleting them) is a bit confusing. Inside a negative if statement, can easily lead to unwanted results if the syntax has an error.
Regards

Hard links do not “must”, point to the same inode as the original file, they do by nature.
I don’t see that should be a problem.
Perhaps you meant to say the files are not on the same device, hence you cannot use hard links?

Hard links do not “must”, point to the same inode as the original file, they do by nature.
I don’t see that should be a problem.
Perhaps you meant to say the files are not on the same device, hence you cannot use hard links?

Hard links do not “must”, point to the same inode as the original file, they do by nature.
I don’t see that should be a problem.
Perhaps you meant to say the files are not on the same device, hence you cannot use hard links?

No, they are not in the same inode.

Well, of course different files are not in the same inode. But if you delete one of them and create a hard link then they will be.

Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Thank you Peter, but my question was not how to use the if statement, but how to specify correctly the symlink within the if statement.

You asked

Maybe you just could help me to enter the right syntax for the [command]

Try to ask the right question next time !

But you do it the same as you would specify any other file !
PeterO

Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Thank you, that is the approach that I expected.
Could you please give me the concrete example of how to specify the linkname?
The stuff with links (e.g. deleting them) is a bit confusing. Inside a negative if statement, can easily lead to unwanted results if the syntax has an error.
...

But then the discussion drifted and I was too lazy to re-ask the full question.
Regards.

It would be better to define a variable called avrdudeLinkName at the start of the script and set it to the full path.
Then use ${avrdudeLinkName} where ever it is needed. That way the filename only occurs in one place in the script.

DO the same for all the long pathnames.

PeterO

Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson