New to Shell scripts and where do you put them

Hey all,

I'm trying to setup an external XML feed for my site and I've received a script to make it all possible. This script places the feed in the MySQL datbasa and can remove the previous feed. Because I am new to this I would like to ask a simple question. Could somebody tell me where do I have to put the shell script? In the public html or in the root of the site or do I need to make a link public_html/scripts? I've got not a clue to make it eassier I've included my files also.

Thanks in advance for your time!

Chris

Supposing you have a ssh or direct access to your server, check your path by typing env and search for something like

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

The different paths are separated by ':'.
If you put your script in on of those directories, it will be launchable without precising the path to it. But generally, the user isn't allowed to write to those directories - and that's safe - so you will have to put them there as root.
Maybe, in your path is there a directory like /home/your_user_name/bin, you can use that one, else i recommend usr/local/bin which contains often a few files. In other cases, you can put where you want but remember you'll have to type the full path to execute them, like

ssh your_user_name@server_URL /path/to/your/script/scriptname # remote by ssh
# or 
/path/to/your/script/scriptname  # directly on the server

Don't forget to make them executable by

chmod +x name_of_script

Merci Beaucoup pour votre aide! I really appreciate it but I can't get it to work yet so could you tell me that the cgi-bin is also allright for placing the shell scripts? To give you some insight I've put a image of my site structure.

Thanks again!

You should put the script in the cgi-bin folder. Here is some more input:

run bash script from cgi-bin or as cgi - Linux Forums
Create a GCI using bash scripting