Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2003 10:38 PM
04-07-2003 10:38 PM
45 00 * * * [ -d /apps/oracle ]&& /apps/sta.sh
This was specified in cronjob(crontab -l).what I don't unserstand is what [ ] is doing ???
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2003 10:40 PM
04-07-2003 10:40 PM
Re: cronjob
this is a simple online script.
the [ ] is for test.
if that directory exists, /apps/sta.sh will be run.
hth
-balaji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2003 10:46 PM
04-07-2003 10:46 PM
Re: cronjob
at 12:45 a.m if the /apps/oracle directory exist,then cron will execute the script/apps/sta.sh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2003 10:51 PM
04-07-2003 10:51 PM
Re: cronjob
I for one would not be doing this in the crontab file. The crontab file does not cater for environement variables.
The testing of the directory should be in the /apps/sta.sh script. If the directory present fails, the script terminates.
if [ -d /apps/oracle ]
do
....
else
exit
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2003 07:17 PM
04-08-2003 07:17 PM
Re: cronjob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2003 07:35 PM
04-08-2003 07:35 PM
SolutionThere is lots of these. The best way is to do a search from
www.google.com
search for shell script tutorials
Here are some links in the forums, that have some great scripts and links to site where there are number of further examples.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x836cc1c4ceddd61190050090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x026250011d20d6118ff40090279cd0f9,00.html
Cheers
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2003 09:20 PM
04-08-2003 09:20 PM
Re: cronjob
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90046/B2355-90046_top.html&con=/hpux/onlinedocs/B2355-90046/00/00/64-con.html&toc=/hpux/onlinedocs/B2355-90046/00/00/64-toc.html&searchterms=posix%7cshell%7cusers%7cguide&queryid=20030408-231630
and search the forums for favorite (not sure of the spe lling) scripts. u should get plenty of them for study / use.
-balaji