Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
executing .profile in crontab file
Name: David Date: June 9, 1999 at 13:07:17 Pacific
Comment:
I execute shell scripts from the crontab file, and I need environment variables to be defined before the execution of the commands. These variables are defined in the .profile, but it doesn't seem to execute. Is there any way to tell the cron to execute the .profile before each command it runs ? Thanks in advance. David
Name: David Liou Date: June 9, 1999 at 15:22:30 Pacific
Reply:
I've run into this problem before. What I did was pretty simple.
At the top of my script file I loaded the profile by typing: ". $homepath/.profile" (exclude the quotes). Of course, you will have to define the homepath variable or you can replace that with an explicit path to your profile. The key is using the . command to load the profile.
I hope this saves you the time that I spent trying to figure this out.
Summary: I edited the Crontab to change the time our database is shutdown nightly. I vi the crontab file directly. When I issue crontab -l the change is listed. The database however shuts down at the original ...
Summary: Is there any way using the korn shell to delete all records in a file except one?? In other words if I had 6 lines in a file, could I issue one command and delete all rows execpt for row 3?? Any hel...
Summary: All, I have a sequence of files that are generated from several hosts (ABC, DEF ... XYZ). File name has following format. ABC_030114_0010.0000 ABC_030114_0113.0001 .... ... ABC_030114_2358.0138 These ...