Question About Path And Commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You have two choices. The first and easiest is to set the path in
your
script so that you don't have to type in fully qualified commands the
hole
time. You can do that by placing this line near the top of the script
(note,
this is a commonly used path, and you may need to add and/or remove
directories from it):

path=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin

The other way is to use the whereis command to find every program you
need,
and then fully qualify everything. For example:

whereis cp

Would tell you where cp is. Here is the output from that command on
my
system:

cp: /bin/cp /usr/bin/cp /usr/man/man1/cp.1.gz
/usr/share/man/man1/cp.1.gz

I don't recommend this aproach for two reasons. First, it can be very
time consuming if you are using a lot of programs. Second, if you
want to give someone else your script for some reason, it may or may
not run depending on if programs are in a different location.
- ---
Joseph C. Lininger
jbahm at pcdesk.net
- ----- Original Message ----- 
From: "Rejean Proulx" <rejean@xxxxxxxxxxxx>
To: <speakup at braille.uwo.ca>
Sent: Sunday, January 25, 2004 6:13 AM
Subject: Question About Path And Commands


I want to set up a weekly cron with the diff and the mail command. 
Cron
requires that everything is fully qualified.

How do I tell where the diff and mail commands are found?  For
example, I
know that cp is in ;/bin/  My script keeps failing and I am trying to
fix
it.

 Rejean Proulx
Visit my family at http://interfree.ca
MSN is: rejp at rogers.com
Ham License VA3REJ
_______________________________________________
Speakup mailing list
Speakup at braille.uwo.ca
http://speech.braille.uwo.ca/mailman/listinfo/speakup

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3

iQA/AwUBQBQxdCenap9Jqj2wEQIGswCgit6xkeNnr1tBWsC7FL+5QX7/xegAoKBc
TFoJbykzRkVc4m2uynf6AT9y
=KDz5
-----END PGP SIGNATURE-----





[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux