Question on tweaking the PATH variable to allow the world to run my executable script

All,

I am pretty new to Unix and still in the learning curve :slight_smile: I have a simple requirement for which I did not get an answer yet (Atleast I do not know how to keyword the search for my requirement!!!).

I have an executable script

my.script1

in a folder

/data/misc/scripts/dev

, which when executed calls 4 other background scripts

my.background1
my.background2
my.background3
my.background4

all running in background and also in the same folder (/data/misc/scripts/dev). The background scripts never come into picture from an User standpoint.

Now my requirement is I want to give my script (my.script1) to all the users and I dont want them executing the script by giving

/data/misc/scripts/dev/my.script1

I know PATH variable can be set so that this type of situation can be handled.
can anyone tell me or point me to how this can be handled, so that my script users execute the script by giving only the script name (my.script1) no matter in what folder they are?

Let me know if you require more inputs

Thanks,
Bharath

Only two things can be possible for this senario.

1) add the "/data/misc/scripts/dev/" to the PATH variable for all users.

2) Create a softlink (name it my.script1) in any of your path for /data/misc/scripts/dev/my.script1.

Thanks Amit

Can you tell me how to add the folder to the PATH variable for all the users?
Also how do I create a soft link?

And as I said I will be calling the background scripts in my script. So when I edit the PATH variable to point to the folder where all scripts are placed, how do I call the background scripts within my script, currently I am calling using their absolute path names /data/misc/scripts/dev/background.scripts. I assume this should work fine but can I use background.script name only instead of the entire PATh once the PATH is set.

Please pardon my ignorance! I know my questions are too naive! Just trying to understand.

Thanks Again
Bharath

Sorry i forgot about the background scripts.

In this case the 1 st solution will only work

in users .profile file in home dir add the export command

export PATH=$PATH:/data/misc/scripts/dev

So as all your scripts are in the folder /data/misc/scripts/dev the shell will find all the scripts while executing.

For softlink check the man pages of "ln"

Nevermind. I misread the question.

Where do I find the .profile file for all users?
I tried checking the /etc/profile. But I do not have access to edit the file as I am not the administrator.

Thanks,
Bharath