•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 426,940 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,330 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser: Programming Forums
Views: 3177 | Replies: 23
![]() |
script1.sh:
script2.sh:
•
•
•
•
ècho Enter minute:
read minute
echo Enter hour:
read hour
/some/dir/script2.sh $minute $hour
script2.sh:
•
•
•
•
echo "$1 $2 * * * /some/dir/BackupScript.sh >/tmp/backupcron.log" >>/etc/crontab
Real stupidity always beats Artificial Intelligence. (Terry Pratchett)
BA BizMg, MCSE, DCSE, Linux+, Network+
BA BizMg, MCSE, DCSE, Linux+, Network+
•
•
Join Date: Aug 2007
Posts: 39
Reputation:
Rep Power: 2
Solved Threads: 0
•
•
•
•
where is the default location, and how do you acquire an alternative?
Dima,
if you can look in the script which i wrote,at the beginning of this thread,i am implementing the functionality of copying inside the backuplocation itself actually we dont need this.
i need to write it like
if mention as now it should take the backup now otherwise when i schedule the cron part.
i tell you my actual requirement--
1)Utility will be run under Specific owner.
2) This utility will clean files in $INTAS_INSTALL_DIR/envsw/logs. And following logs will be backed up or deleted.
All Logs and Core files
3) mt_clean -a<action> [-t <time>] -L <backup location>
-a<action> - has two values "delete" or "backup”. If not specified by default "delete" action will occur. If "backup" option is given, files will be backed up on the location specified by the -L, -L is mandatory if back up option is specified.
-t<time> - The time is given with the -t option and its default is 1am
A time of 'now' means to execute the cleanup operation now
A time of 'never' means that the cleanup operation should not be scheduled and any existing cleanup should be cancelled.
-L <backup location> - this field is mandatory if backup action is selected.
Note: As middle tier process are running and not stopped while this utility is running, the utility should create an empty file with same name which has deleted or backed up. Otherwise middle tier logs will not be generated until the middle tier process is restarted. Any core files will be backed up or deleted according to the action chosen.
i have created the script according to the req but its not doing anything for me so need your help,I will thansk alot if you can provide me a sample script for this.
Thanks
![]() |
•
•
•
•
•
•
•
•
DaniWeb Shell Scripting Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
Other Threads in the Shell Scripting Forum
- Previous Thread: Seeks help to compare strings stored in arrays
- Next Thread: QUESTION ABOUT .vbs scripts in windows.



Linear Mode