shell script location w/ Panther

 
Thread Tools Search this Thread
Operating Systems OS X (Apple) shell script location w/ Panther
# 1  
Old 02-24-2004
shell script location w/ Panther

I'm sure there things have only been asked a thousand times (I just couldn't find the answers):

I am running Panther (Mac OS X ver. 10.3.2.[at present]).
I am using the (default) bash shell.
I am *starting* to write shell scripts.

I would like to "install" some shell scripts, so that they are always available for execution (for me only), and preferably so that they can be called by simply typing their filename (plus optional parameters).
I don't want to type ./filename or something.

I *suspect* I'd need to do the following:
- Write the script(s) and store it/them in a location where it's good practice to put them.
- Write/edit a ~/.bashrc file and add an alias/aliases for every command I want included.

Am I right with the above?
Would there be additional things I'd need to do?
Also, what location would be good practice to put these things in?

Alternatively, there wouldn't be a way to just include the files in the path and it would work, would it? (I remember this from goody ole DOS.)

Also, I'd be interested to learn how I can make these scripts available to everyone (but otherwise as above). This would obviously mean storing them in a commonly accessible location -- again, I'd like to know where it's good practice to put them. Plus, I'd need something else than ~/.bashrc.

Again, if I'm entirely on the wrong track, please do not hesitate correcting me. I am not looking for a quick fix, I am looking for a solution that's truly best practice with my OS.

Many thanks in advance!!!

Smilie Smilie Smilie

rop
# 2  
Old 02-25-2004
Quote:
I would like to "install" some shell scripts, so that they are always available for execution (for me only), and preferably so that they can be called by simply typing their filename (plus optional parameters).
I don't want to type ./filename or something.
Put them in a new directory under your home directory - add that new directory to your path with your .profile or shell . file.

Quote:
Also, I'd be interested to learn how I can make these scripts available to everyone (but otherwise as above). This would obviously mean storing them in a commonly accessible location -- again, I'd like to know where it's good practice to put them. Plus, I'd need something else than ~/.bashrc.
Hmmm, I don't use your OS but in any you will find different places that are normal for inclusion as a directory where everyone can access scripts - it just matters what we were taught - it only matters that you don't start giving access to directories that users should not be running/changing scripts in. You also don't want to put them where the OS puts things only for the fact that an upgrade may delete them. Using /usr/local/bin or /usr/local/sbin is what we use at my company but I have also seen /opt directories created for the same purpose - as long as it's added to the environment PATH you would have no problem.
# 3  
Old 02-26-2004
Thanks folks, the issue is resolved.
The "bloody comptetition" Smilie was quicker this time! ;-)

(Hmm. Couldn't find an option to close threads. Wonder if they do that automatically, then?)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to change the path location within the shell script?

Hi ALL, I am trying to find the installed tomcat version and location of the server.xml file to get the tomcat port number. Using below script to do that. #!/usr/bin/env bash var1=$(find / -name "version.sh" ! -size 0 2>&1 |egrep -v "tmp|docker") for loc1 in $var1 do ... (1 Reply)
Discussion started by: sravani25
1 Replies

2. Shell Programming and Scripting

File transfer from UNIX to shared location using shell script

Is there any possible way transfering the file from unix to shared location using shell script. i had created the batch script to fetch the files from unix to shared location and it works fine. Due to some problem in windows unable to transfer the file to shared location automatically. can anyone... (2 Replies)
Discussion started by: venkat918
2 Replies

3. Shell Programming and Scripting

Copying the files in to multiple location using shell script

Hi All, i'm trying to copy the 1.txt files (sample files) in to different path location using the below command. But it is not copying the files , when i tried for single location able to copy the file. can any one please assist here. Please find the below path :- /ckr_mkr1/licencekey... (2 Replies)
Discussion started by: venkat918
2 Replies

4. Shell Programming and Scripting

Shell script to read specified value from file and echo to the same location to other file.

Hello. I want to to backup some "default:" values from a file do some other job and after restore that "default:" values back. The problem is that the source and destination file has a lot of default: strings in it but with different values... So.. Here is an example: A part of my source... (6 Replies)
Discussion started by: ausdim
6 Replies

5. Shell Programming and Scripting

How to find a existing file location and directory location in Solaris box?

Hi This is my third past and very impressed with previous post replies Hoping the same for below query How to find a existing file location and directory location in solaris box (1 Reply)
Discussion started by: buzzme
1 Replies

6. Shell Programming and Scripting

shell script to add input at certain location into a file

Hi, I am using Solaris 10 OS and trying to create shell script that can add input at certain location into a file. The input that I am trying to put is new domain name e.g @newdomain.com the file contains, more test01.out user/zzzz786@st.com/INBOX user/zzzz@po.com/INBOX... (8 Replies)
Discussion started by: Mr_47
8 Replies

7. Shell Programming and Scripting

shell script to replicate the log files from one location to another in real time

Hi, On the server, we have app log files in this location /app/logs/error.log On the same server, in a real time, we would like to replicate that into /var/ directory. if someone has already done this, please share the script. Thanks in advance. (4 Replies)
Discussion started by: lookinginfo
4 Replies

8. Shell Programming and Scripting

Shell Script for Copy files from one location to another location

Create a script that copies files from one specified directory to another specified directory, in the order they were created in the original directory between specified times. Copy the files at a specified interval. (2 Replies)
Discussion started by: allways4u21
2 Replies

9. Shell Programming and Scripting

Find the geographical location within a shell script

Hi, I need a shell script that when run should be able to find the geographical location of the system. can anyone help me with this? Thanks, Sundeep (1 Reply)
Discussion started by: eamani_sun
1 Replies

10. Post Here to Contact Site Administrators and Moderators

UNIX on OS X (Panther)

I wanna know what Panther (The Next Major Release Of OS X) Due Date: around August I predict that X11 will be released in a new Full stable version in the new OS X (No new revelation) And Safari (Apple's FAST Internet Browser) will be implemented in Full... I'm Guessing that the new G5... (0 Replies)
Discussion started by: DonJawz
0 Replies
Login or Register to Ask a Question