On 11/11/19 12:38 PM, Walter Dnes wrote:
On Mon, Nov 11, 2019 at 04:37:17AM +0000, Caveman Al Toraboran wrote
hi - is it possible to have some kind of fancy links that
know the name of the process that is trying to access
it, and based on its name, it links it to a file?
   Short answer... YES!  Now convince the developers to use it.  Here's a
trivial example...

* Create a 2-line executable script "foo"
#!/bin/bash
echo "${0}"

* Create a symlink with the command "ln -s foo bar"

* Execute "./foo" and the output will be "./foo"

* Execute "./bar" and the output will be "./bar"

That makes a distinction based on the name by which the script was called, not on the name of the calling script.  Caveman Al, have I misunderstood what your are asking for?

Jack


Reply via email to