The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - General (http://hintsforums.macworld.com/forumdisplay.php?f=16)
-   -   find and email script (http://hintsforums.macworld.com/showthread.php?t=35547)

gowrann 02-28-2005 08:13 AM

Output:
Code:

macserver:/ root# /Cronnix.info.sh
/Cronnix.info.sh: line 3: root
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
/bin/sh: No such file or directory


weltonch777 02-28-2005 08:30 AM

So, it's running as root, using sh, and these are the path's it is checking:

/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin

If your file is not in one of those paths, it will not find it. I would suggest putting it in /usr/local/bin , or editing the PATH declaration in /etc/profile to include your script directory. Make sure to type . profile
after you change it, or nothing will happen till you reboot ( that's DOT SPACE profile , while inside the etc directory)

gowrann 02-28-2005 10:55 PM

use of:
Code:

. /
fixed it

gowrann 04-19-2005 10:31 PM

One more addition
 
Hi this works for me just great - however what code do I need if I only want the script to email me if the search finds something.

If the search is blank then I do not want an email.


All times are GMT -5. The time now is 06:21 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.