01-21-2004
Yes, the commands work if I put them in a separate script and run it via Cron. Running in Korn shell--Sun Solaris 7. Here are the first several lines of the script:
-----------------------------------------------------------------------------------
#!/usr/bin/ksh
#
#
# Production DB Backup Script
#
# prod_online_backup
#
#
# Set ENV Vars
#
DLC=/opt/dlc91d;export DLC
PATH=$DLC/bin:$DLC:$PATH;export PATH
PROMSGS=/opt/dlc91d/promsgs;export PROMSGS
LOG=/usr/bin/st_scripts/log_files/scripts_log
#
#
# Remove any database or AI backup directories older than 1 day
#
find /unifi_dev_bkup/database/backup_files/prod -name `date +%y`* -mtime +0 -exec rm -r {} \;
find /unifi_dev_bkup/aifiles/prod -name '*a*' -mtime +0 -prune -exec rm -r {} \;
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi experts,
I have a shell script (korn shell on aix) where I am giving find command with file options which are read from a configuration file. For some reason I am getting an error find: 0652-017. I have put set -x in the shell script and the command looks okay. If I cut it and paste it in the... (6 Replies)
Discussion started by: kodermanna
6 Replies
2. UNIX for Dummies Questions & Answers
I have a script that has the following command:
find /home/user -name test.dat
The script works as desired when running normally. However, when I run the script preceding it with 'sh', it fails. Is there something I need to account for when preceding the execution of the script with 'sh'? (1 Reply)
Discussion started by: bsavitch
1 Replies
3. Shell Programming and Scripting
I am running shell scripts on windows using Cygwin tool.
In my shell scripts, i want to add an error check, that verify whether a certain command is available or not.
For example if SED comamnd is not available in Cygwin, then it should exit with error message.
How do i write such shell... (2 Replies)
Discussion started by: mmunir
2 Replies
4. Shell Programming and Scripting
Hello, I've been trying to use find command to find and print out some files. When I execute the command on the command line I get the output as expected howerver when I run it in the script it doesn't wrap.
For example, this is nicely wraped
find /etc -perm -o=w -exec ll '{}' \;... (4 Replies)
Discussion started by: mirusko
4 Replies
5. Shell Programming and Scripting
Hi,:)
find /etc /bin /usr/bin /usr/sbin /var/adm \ -name '*.a' \ '!' '(' -user root -o -user daemon -o -user bin -o -user sys -o -user adm -o -user uucp -o -user nuucp -o -user lpd -o -user imnadm -o -user ipsec -o -user ldap -o -user lp -o -user snapp -o -user invscout ')' \ '!' '(' -group... (4 Replies)
Discussion started by: sakthilinux
4 Replies
6. UNIX for Dummies Questions & Answers
I am new to Shell scripting.Please give some guidence How to place a find command in my shell script? (6 Replies)
Discussion started by: dineshmurs
6 Replies
7. Shell Programming and Scripting
Hi,
I want write a script to zip the files in a directory with are not having *.gz extension files.
exp: source directory haveing *.log,*.sal,*.txt,*.gz....and some of files with out extension.
so i want ZIP the files which are not *.gz files in the same directory.
i worte like this:
... (2 Replies)
Discussion started by: koti_rama
2 Replies
8. Shell Programming and Scripting
Hi,
dirs.conf fine contains below data
/a/b/c/dir1|50
/a/b/c/dir2|50
/a/b/c/dir3|50
In a shell script I do as below
while read file_rec
do
dir_name=`echo "${file_rec}" | cut -d "|" -f 1`
purge_days=`echo "${file_rec}" | cut -d "|" -f 2`
if
then... (3 Replies)
Discussion started by: icefish
3 Replies
9. Shell Programming and Scripting
hi
I am a newbee in Shell scripting (hardly 7 days)
I have to execute a shell script which looks like this
#!/bin/sh
var1=`date +"%Y%m%d"`
echo $var1
find . -name "$var1*" -exec mv {} Delete/ \;
the find command in the script is running independently but when kept in this script it is... (24 Replies)
Discussion started by: sweetnsourabh
24 Replies
10. Shell Programming and Scripting
Hi all,
Please i need an explanation for the following statements
ref_file=/tmp/cleanfiles export ref_file
touch `TZ=WAT+2 date "+%Y%m%d%H%M"` $ref_file
find . ! -name . -prune -type f ! -newer $ref_file -exec store_file.sh {} \; (1 Reply)
Discussion started by: anish_1982
1 Replies
LEARN ABOUT DEBIAN
zoomsh
ZOOMSH(1) Commands ZOOMSH(1)
NAME
zoomsh - ZOOM shell
SYNOPSIS
zoomsh [-e] [-v loglevel] [commands...]
DESCRIPTION
zoomsh is a ZOOM client with a simple command line interface. The client demonstrates the ZOOM API and is useful for testing targets.
You may pass one or more commands to zoomsh. These commands are invoked first.
OPTIONS
-e
Makes zoomsh stop processing commands as soon as an error occur. The exit code of zoomsh is 1 if error occurs; 0 otherwise.
-v loglevel
Sets YAZ log level.
EXAMPLES
If you start the yaz-ztest in one console you can use the ZOOM shell as follows:
$ zoomsh
ZOOM>connect localhost:9999
ZOOM>search computer
localhost:9999: 7 hits
ZOOM>show 0 1
1 Default USmarc
001 11224466
003 DLC
005 00000000000000.0
008 910710c19910701nju 00010 eng
010 $a 11224466
040 $a DLC $c DLC
050 00 $a 123-xyz
100 10 $a Jack Collins
245 10 $a How to program a computer
260 1 $a Penguin
263 $a 8710
300 $a p. cm.
ZOOM>quit
You can also achieve the same result by passing the commands as arguments on a single command line:
$ zoomsh "connect localhost:9999" "search computer" "show 0 1" quit
COMMANDS
connect zurl
Connects to the target given by zurl.
close [zurl]
Closes connection to target given by zurl or all targets if zurl was omitted.
show [start [count]]
Displays count records starting at offset given by start. First records has offset 0 (unlike the Z39.50 protocol).
quit
Quits zoomsh.
set name [value]
Sets option name to value.
get name
Prints value of option name.
help
Prints list of available commands.
SEE ALSO
yaz(7), yaz-ztest(8),
Section "Building clients with ZOOM" in the YAZ manual.
ZOOM home page[1].
NOTES
1. ZOOM home page
http://zoom.z3950.org/
YAZ 4.2.30 04/16/2012 ZOOMSH(1)